Get Appointment

t

WooCommerce Skip Cart Page - Redirect to Checkout - WITHOUT PLUGIN

  • Vfix Technology
  • 02 Jul 2024
  • Wordpress ,  WooCommerce
  • 1289 Views

Learn how to bypass the cart page in WooCommerce and redirect customers directly to the checkout, all without using any plugins. Follow this step-by-step guide to streamline your customers' shopping experience and boost your store's conversions.

Step 1: Go to woocommerce setting -> product : check Redirect to the cart page after successful addition.

Step 2: Add this code into Wordpress theme -> function.php 
 

// Function that skip cart redirecting to checkout
function skip_cart_page_redirection_to_checkout() {
    // If is cart page, redirect checkout.
    if( is_cart() )
        wp_redirect( WC()->cart->get_checkout_url() );
}
add_action('template_redirect', 'skip_cart_page_redirection_to_checkout');

 

Tags
Share :


+91 8447 525 204 Request Estimate