• Resolved webintenerife

    (@webintenerife)


    Hello. I’m trying to use Product Variation Table plugin and it looks great. My only issue is that it totally ignore Deirect Checkout plugin settings so it correctly adds the product variation to the cart but it remain on the product page. There is a way I can get the user to be redirected to the checkout page?

    Thank you in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPXtension

    (@wpxteam)

    @webintenerife

    I hope you are doing well today.

    Please insert the following code using the Code Snippets plugin or add the snippet inside your child theme’s functions.php file:

    add_filter('pvtfw_cart_redirect_url', function($url){
    if( is_product() ){
    $url = site_url('/checkout');
    return $url;
    }
    }, 10);

    If you didn’t enable the?Redirect to the cart page after successful addition?from?WooCommerce > Settings > Products > General > Add to cart behaviour?then try the following snippet:

    add_filter( 'pvtfw_added_cart_filter', function($script){
    $cart_url = site_url('/checkout');
    $script2 = sprintf('window.location.href = "%s"; return;', $cart_url);
    return $script2;
    }, 10, 1);

    Please let me know your feedback if it was helpful. Hope to hear from you soon.

    Best Regards

    Thread Starter webintenerife

    (@webintenerife)

    Thank you so much for your help. That code just work perfectly. Thank you again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Direct Checkout’ is closed to new replies.