Default product won’t go to Checkout
-
Hi guys,
Up until recently, I have had a working cart with a small custom function that adds a default product to the cart whenever it is empty (code below). Now, if the default product is the only product in the cart, the cart will not proceed to the checkout page. It simply redirects back to the cart over and over. The link says it will go to /checkout but it then bounces back to /cart.If you shop more and add a different product manually, the cart will go on to the checkout page, as expected. I haven’t made any code changes or added plugins or anything to cause this to break. I have updated WP and WooCommerce along the way, though.
See the issue at:
http://americancremation.com/cartAny ideas are welcome. I have already checked the WC settings, changed to a different theme (doesn’t help), checked .htaccess, made sure I’m not forcing https, everything I can think of.
———————
CODE for default product (in functions.php)function woo_default_product() { if (WC()->cart->get_cart_contents_count() == 0) { WC()->cart->add_to_cart( 330 ); } } add_action('woocommerce_check_cart_items', 'woo_default_product');
The page I need help with: [log in to see the link]
- The topic ‘Default product won’t go to Checkout’ is closed to new replies.