Fatal error: Call to a member function add_to_cart_url() on a non-object
-
Hi,
I receive this error on the compare lightbox when I try to use your wonderful plugin:
Fatal error: Call to a member function add_to_cart_url() on a non-object in /home/XXX/public_html/themes/XXX/wp-content/plugins/woocommerce/templates/loop/add-to-cart.php on line 16
Also tried with Twenty-Fourteen to check whether the issue was due to the custom theme, but the problem persists despite of the theme.
As workaround on my version of add-to-cart.php I used:
if (!isset($product)) global $product;
Maybe someone could find this kind of approach useful or, better, you could recommend a better solution.
TIA, Manuel ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fatal error: Call to a member function add_to_cart_url() on a non-object’ is closed to new replies.