• Resolved verticalpaleo

    (@verticalpaleo)


    Hey guys,

    Just updated to the latest 3.0.1 version of woocommerce.

    I have this error message showing in the header in the front end of my shop page :

    supplied for foreach() in /home/xxxxxx/www/wp-content/plugins/woocommerce/includes/class-wc-structured-data.php on line 291

    If you could help me out to fix this that would be awesome.

    Running storefront and all plugins are updated ??

    website : verticalpaleo.com

    Greetings from Paris

Viewing 10 replies - 1 through 10 (of 10 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi there!

    Have you perhaps added any code to remove the breadcrumbs?

    Cheers!

    Thread Starter verticalpaleo

    (@verticalpaleo)

    Yes, guess right ! add_filter( ‘woocommerce_get_breadcrumb’, ‘__return_false’ );

    Is there any way to remove breadcrumbs without showing this error message ?

    Thanks !

    • This reply was modified 7 years, 10 months ago by verticalpaleo.
    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi!

    You could use some CSS to hide it. See if this works for you:

    .woocommerce-breadcrumb {
        display: none;
    }

    In the event that your theme doesn’t provide an option to save custom CSS as part of its theme settings, you could add it in via a plugin that allows custom CSS to be added — such as the Simple Custom CSS plugin (like the one available in JetPack). Please don’t add custom code directly to your parent themes stylesheet.css as this will be wiped entirely when you update.

    Cheers!

    Thread Starter verticalpaleo

    (@verticalpaleo)

    Edit : It’s all fine actually ! The error message is not showing anymore!Just needed it refresh/update the homepage ??
    Thanks a lot !

    Thanks ! Actually, the code is written in the child theme. Just removed it from the php function file from the child theme and add the css line you gave with css customiser by site origin. The error message disappeared from the shop page but now appears in the homepage. You can check it here :

    https://verticalpaleo.com

    • This reply was modified 7 years, 10 months ago by verticalpaleo.
    • This reply was modified 7 years, 10 months ago by verticalpaleo.
    • This reply was modified 7 years, 10 months ago by verticalpaleo.
    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi!

    I don’t see any errors there.

    Cheers!

    Thread Starter verticalpaleo

    (@verticalpaleo)

    It’s all fine ! No more error message ! Many thanks !

    Hi,

    I’m getting the same error. I tried the solutions mentioned here, but I am still getting the error message:
    Warning: Invalid argument supplied for foreach() in /home/mxxxxxxx/mxxxxxxx.com/wp-content/plugins/woocommerce/includes/class-wc-structured-data.php on line 294.

    I tried to hide the breadcrumbs using CSS and also tried remove it all together, nothing is working. What did you do exactly to remove your error?

    Thread Starter verticalpaleo

    (@verticalpaleo)

    Hey,

    Withdraw the code to remove breadcrumb initially in the php.function file and used the CSS. Refresh without cache the home page (command + shift + R on mac).

    Hope it helps ??

    Thanks for the response!

    I put add_filter( ‘woocommerce_get_breadcrumb’, ‘__return_false’ ); in my functions.php file.
    Added .woocommerce-breadcrumb { display: none;} to my CSS

    Refreshed without cache

    I’m still getting the error….

    • This reply was modified 7 years, 10 months ago by muse777.

    Its been resolved. Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Warning: Invalid argument after update 3.0.1’ is closed to new replies.