• Resolved henriathamba

    (@henriathamba)


    Hi

    I am struggling to get the ‘Add to Cart’ button is not redirecting to the checkout page.
    I am using the Divi theme (4.6.2) hosted on a Godaddy Managed WordPress Servers.

    The Solutions that I have already have tried are the following plugins and code snipets:
    Direct Checkout for WooCommerce (Plugin)
    Direct checkout, WooCommerce Single page checkout , WooCommerce One page checkout (Plugin)
    Woocommerce Add-to-Cart Custom Redirect (Plugin)

    Then I also tried this code snippet but also didn’t work that was added to the child the functions.php file:

    
    add_filter('add_to_cart_redirect', 'lw_add_to_cart_redirect');
    function lw_add_to_cart_redirect() {
     global $woocommerce;
     $lw_redirect_checkout = $woocommerce->cart->get_checkout_url();
     return $lw_redirect_checkout;
    }
    

    I have tried this by disabling the AJAX in the Woo-Commerce Settings but that didn’t help either.

    The only way I got it to work is by opening the page in a incognito tab (Chrome) but only worked once.

    Any assistance will be greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Riaan K.

    (@riaanknoetze)

    Hi there,

    I’ve just worked through a sample checkout process on the link you shared and the redirect happened as expected. Here’s what I’m seeing when clicking on the add-to-cart button:


    Link to image: https://d.pr/i/7Dzx1N

    Are there any specific steps we should be following?

    Thread Starter henriathamba

    (@henriathamba)

    Hi @riaanknoetze

    Yes, Try it again then I think it wont work, as mentioned above when I open it in an incognito tab it works, but when I try again it does not work. So I am thinking it might be something to do with cookies.

    Thread Starter henriathamba

    (@henriathamba)

    So I found that if I delete the cookie in chrome dev tools “wp_woocommerce_session” it goes though to the checkout page, but when its on it does not. No solution so far.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @henriathamba. I took a look at your site and clicked on “Buy the guide”. I could do this again and again and get redirected to the checkout page.

    It looks like you’ve managed to resolve the issue so I’m going to go ahead and resolve this thread. If you have any other questions, please start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Redirect Not working’ is closed to new replies.