• Resolved ellis926

    (@ellis926)


    Hello,

    I am receiving multiple .php warnings on the cart page of my website. I have disabled each plugin on my site and found the flexible shipping plugin to be the culprit. When I disable this plugin, the warnings disappear. How can i resolve this error?

    Regards,
    Ellis

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support dyszczo

    (@dyszczo)

    Hi Ellis,

    Could you provide content of the warnings? We have checked https://www.suppleform.co.uk/cart/, and there are no warnings at the moment.

    We will try to fix the issue as soon as possible.

    Regards,
    Christopher

    I am receiving the same errors since the latest update. The errors occur in both the cart and checkout page. It’s not always visible, only when I add a product to the cart:

    Warning: Invalid argument supplied for foreach() in /www/wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 1237
    
    Warning: array_map(): Argument #2 should be an array in /www/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php on line 351
    
    Warning: array_sum() expects parameter 1 to be array, null given in /www/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php on line 351
    
    Warning: Invalid argument supplied for foreach() in /www/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php on line 615
    
    Warning: Invalid argument supplied for foreach() in /www/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php on line 575
    
    Warning: Invalid argument supplied for foreach() in /www/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php on line 575
    Plugin Support dyszczo

    (@dyszczo)

    Hi,
    thank you both very much.
    It is strange as there should not be any changes that could cause such errors.

    For the time being please disable warning notices by settings in wp-config.php

    define( ‘WP_DEBUG’, false );

    Best regards,
    Christopher

    Hi Christopher, I have WP_DEBUG off and even tried ini_set(‘display_errors’,’Off’) but it’s still showing.

    Update: I reverted back to version 3.1.5 and the error was still there. Then I went back to 3.1.4 and the error went away.

    • This reply was modified 5 years, 9 months ago by jdewit.
    Plugin Support dyszczo

    (@dyszczo)

    Hi jdewit,

    We have done a quick review of the possible causes of such behaviour, and the most probable cause is invalid tax settings in WooCommerce. In that scenario, the warnings will probably show themselves whether any shipment method is configured.

    Could you please check if the warning persists when FS is disabled, but some other shipment method is an available, ie. flat rate?

    Best regards,
    Christopher

    Hi Christopher, I updated my last message but in case you missed it: I reverted back to version 3.1.5 and the error was still there. Then I went back to 3.1.4 and the error went away.

    I have a test website where I can test it with an other shipping method. I can give you access to the test website if you want.

    for further support, please contact us here: https://www.wpdesk.net/contact/

    see you there!

    Hi,

    few minutes ago we released a version of plugin 3.1.7, in which we fixed bug reported here.

    Please, let me know after verification if everything is ok.

    Cheers,
    Pr

    Hi Pr,

    I updated to 3.1.7 and the error is fixed. Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Invalid argument supplied for foreach()… warning on Woocommerce cart page’ is closed to new replies.