ISSUE (error): The The “add_to_cart_fragments” hook uses out of date data structures and function is deprecated since version 3.1.2. Replace with woocommerce_add_to_cart_fragments

The function ‘add_to_cart_fragments’ is an outdated woocommerce function. Woocommerce version 3.0 and above have changed the filter to ‘woocommerce_add_to_cart_fragments. If your WordPress, themes and plugins are outdated then this problem could be easily fixed by updating your website in just a click!
If you’re having trouble with this on your website’s “error_logs” while your website is up to date, you should find where the “add_to_cart_fragments” function is located. See the photo where I found “add_to_cart_fragments” On my end under the ‘Essential Grid’ plugin.

I replaced the “add_to_cart_fragments” to “woocommerce_add_to_cart_fragments” then finally the error_logs is now clean! Please take note: review first the file class-wc-deprecated-filter-hooks.php under the woocommerce plugin directory “woocommerce/includes/” to match the code function for your theme and plugin.

Cheers!
Comments
Post a Comment