• Resolved N.g

    (@loralora)


    Hello,
    Thanks for the great plugin.
    I’m getting an error when placing an order. Could you please check this from your side?

    The error was last time triggered by the URL /?wc-ajax=checkout
    It seems the cause of the error is the line 117 of the file wp-content/plugins/estimated-delivery-for-woocommerce/estimated-delivery-woocommerce.php.
    Here you have the error:

    Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in wp-content/plugins/estimated-delivery-for-woocommerce/estimated-delivery-woocommerce.php:117 Stack trace: #0 wp-content/plugins/estimated-delivery-for-woocommerce/estimated-delivery-woocommerce.php(117): count(”) #1 [internal function]: EDWCore->edw_save_custom_order_item_meta_data(Object(WC_Order_Item_Product), ‘4a4ae8ed6f8e360…’, Array, Object(WC_Order)) #2 wp-includes/class-wp-hook.php(310): call_user_func_array(Array, Array) #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array) #4 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 wp-content/plugins/woocommerce/includes/class-wc-checkout.php(549): do_action(‘woocommerce_che…’, Object(WC_Order_Item_Product), ‘4a4ae8ed6f8e360…’, Array, Object(WC_Order)) #6 wp-content/plugins/woocommerce/includes/class-wc-checkout.php(496): WC_Checkout->create_order_line_items(Object(WC_Order), Object(WC_Cart)) #7 wp-content/plugins/woocommerce/includes/class-wc-checkout.php(439): WC_Checkout->set_data_from_cart(Object(WC_Order)) #8 wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1256): WC_Checkout->create_order(Array) #9 wp-content/plugins/woocommerce/includes/class-wc-ajax.php(508): WC_Checkout->process_checkout() #10 [internal function]: WC_AJAX::checkout(”) #11 wp-includes/class-wp-hook.php(310): call_user_func_array(Array, Array) #12 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array) #13 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #14 wp-content/plugins/woocommerce/includes/class-wc-ajax.php(96): do_action(‘wc_ajax_checkou…’) #15 [internal function]: WC_AJAX::do_wc_ajax(”) #16 wp-includes/class-wp-hook.php(310): call_user_func_array(Array, Array) #17 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #18 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #19 wp-includes/template-loader.php(13): do_action(‘template_redire…’) #20 wp-blog-header.php(19): require_once(‘/home/l/…’) #21 index.php(17): require(‘/home/l/…’) #22 {main} thrown

    Here an extract of the code:

    115 if($savedOnOrder != ‘0’) {
    116 $date = $this->edw_show_message($values[‘product_id’], true);
    117 if(count($date) == 2) {
    118 $item->update_meta_data( $date[0], $date[1] );
    119 }
    120 }

  • The topic ‘error /?wc-ajax=checkout’ is closed to new replies.