is_user_logged_in causing woocommerce foreach error?
-
So I am using User Avatar and hooking into User Avatar on front end. I am checking if the user is logged in before showing the Avatar and allowing them to update the avatar. When loading wp-admin using ajax in thickbox I get this woocommerce for each error.
Warning: Invalid argument supplied for foreach() in wp-content/plugins/woocommerce/admin/woocommerce-admin-init.php on line 141
I believe this is because I am using <?php get_header()?> and <?php get_footer()?> which both use woocommerce.
Anyone know how I could get around this Warning message in the thickbox it doesn’t have a class or anything else associated with the message so no way to just hide it haha… Not sure why it is even displaying int he first place when the template I am using this on has nothing to do with woocommerce.
Thanks in advance.
- The topic ‘is_user_logged_in causing woocommerce foreach error?’ is closed to new replies.