Automatically add product to cart on visit
-
Hi there,
I found the script for Automatically add a product to cart on visit.
https://docs.woocommerce.com/document/automatically-add-product-to-cart-on-visit/After trying it on my website, it triggers an error to the website. Following is the error message.
An error of type E_ERROR was caused in line 13 of the file /nas/content/live/acewasteprod/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()’d code. Error message: Uncaught Error: Call to a member function get_cart() on null in /nas/content/live/acewasteprod/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()’d code:13
Does anyone know how to resolve this issue?
Thank you in advance.
- The topic ‘Automatically add product to cart on visit’ is closed to new replies.