woocommerce_add_to_cart_redirect porblem
-
Hi guys!
If users add a product to their cart, then navigate to a different page, and then try to re-add a subscription product to their cart, the user is redirected to the home page.
I use this code in the functions.php :
<?php
add_filter (‘woocommerce_add_to_cart_redirect’, ‘woo_redirect_to_checkout’);
function woo_redirect_to_checkout() {
$checkout_url = WC()->cart->get_checkout_url();
return $checkout_url;
}I use this link in my button:
http://my-site.com/?add-to-cart=productIDmy site: http://d8c.ebd.myftpupload.com/60daychallenge/
To ad to cart, click the first button: ‘krijg direct toegang’
To clear the product out of your basket, go to: http://d8c.ebd.myftpupload.com/winkelwagenHow can I fix this?
Thanks in advance for your help!
Gr. Chris
- The topic ‘woocommerce_add_to_cart_redirect porblem’ is closed to new replies.