Hestia + Gutentor + WooCommerce Fatal Error
-
I’ve discovered a bug that only occurs when using Hestia with Gutentor and WooCommerce. I’ve traced it to being a problem with Hestia, as it’s making a function call that doesn’t have the right number of params included. It appears as though this has something to do with the theme’s compatibility extensions, as the problem occurs in the compatibility directory.
It’s extremely similar to this situation, although this is with the theme Novo: https://www.ads-software.com/support/topic/critical-error-woocommerce-product-overview/
The error for me in this case is:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Gutentor_Extend_Api::alter_cart_link(), 2 passed in /Users/kevin/dev/local-sites/bmt.tv.local/app/public/wp-includes/class-wp-hook.php on line 303 and exactly 3 expected in /Users/[username]/dev/local-sites/[sitename].local/app/public/wp-content/plugins/gutentor/includes/tools/class-gutentor-extend-api.php on line 272
The problem occurs in
inc/compatability/woocommerce/add-to-cart.php:33
. I was able to fix the problem by adding$args
as the final argument to thewoocommerce_loop_add_to_cart_link
filter call, but I’m not sure if this is the correct way to fully mitigate issues (I just followed the pattern of how other plugins usewoocommerce_loop_add_to_cart_link
).Currently the site I’m experiencing this with is only in local development, but I’ll just override the erring file with my child theme. I’d of course love it if this fix made new versions so I could update in good conscience.
WordPress v5.8
Hestia v3.0.17
Experienced on both Firefox and Chrome, latest versions
MacOS latestPlease let me know if you have any questions. I almost just filed this in Trac (but ugh, Trac), but it seemed a bit presumptuous, given I’m not a contributor.
Thank you for providing such a great theme!
- This topic was modified 3 years, 3 months ago by .
- This topic was modified 3 years, 3 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Hestia + Gutentor + WooCommerce Fatal Error’ is closed to new replies.