WooCommerce error after last update.
This support request was posted in Smart by Alex
Hi NiceTheme support.
After last WooCommerce update stop working all shop with following error:
Fatal error: Uncaught TypeError: Argument 2 passed to nice_woocommerce_integration_post_class() must be of the type array, string given, called in /MYBESTGIFTSADVISOR.COM/wp-includes/class-wp-hook.php on line 286 and defined in /MYBESTGIFTSADVISOR.COM/wp-content/themes/smart/includes/plugin-integrations/woocommerce/public/layout.php:652 Stack trace: #0 /MYBESTGIFTSADVISOR.COM/wp-includes/class-wp-hook.php(286): nice_woocommerce_integration_post_class(Array, ”, 529) #1 /MYBESTGIFTSADVISOR.COM/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #2 /MYBESTGIFTSADVISOR.COM/wp-content/plugins/woocommerce/includes/wc-template-functions.php(651): apply_filters(‘post_class’, Array, ”, 529) #3 /MYBESTGIFTSADVISOR.COM/wp-content/plugins/woocommerce/includes/wc-template-functions.php(668): wc_get_product_class(”, 529) #4 /MYBESTGIFTSADVISOR.COM/wp-content/plugins/woocommerce/templates/content-single-product.php(34): wc_product_class(”, Obj in /MYBESTGIFTSADVISOR.COM/wp-content/themes/smart/includes/plugin-integrations/woocommerce/public/layout.php on line 652Can you give me the solution for this problem?
Alex.Juanfra Aldasoro April 24, 2019 at 1:46 pmHi Alex,
Thank you for reaching out! I’m sorry to hear that.
What’s the WooCommerce version you switched to?
Thanks,
Juan.Juanfra Aldasoro April 24, 2019 at 2:06 pmThanks for the follow-up, Alex.
And you get to see this error when you visit the product page only?
Best,
Juan.No, I see it when I visit product page and the catalog page. Both of them.
Alex.
Juanfra Aldasoro April 25, 2019 at 3:40 pmThanks for the follow-up, Alex.
Would you please replace the file you have on smart/includes/plugin-integrations/woocommerce/public/layout.php
with this one: https://gist.github.com/juanfra/5a0ba6d95103321daf94238390703241
Best,
Juan.Juanfra Aldasoro April 26, 2019 at 1:35 pmHi Alex,
Thanks for the follow-up. And thank you for flagging this issue.
Have a nice weekend,
Juan.
You must be logged in to reply to this topic.