Redirect to the checkout page after Add to Cart

To redirect the user to the checkout page once “Add To Cart” has been clicked on  a product.

Add the below code your themes functions.php file

//Checkout redirect after add to cart

function woo_redirect_to_checkout_add_cart() {
   return wc_get_checkout_url();
}
add_filter( 'woocommerce_add_to_cart_redirect', 'woo_redirect_to_checkout_add_cart' );

Leave a Reply

Your email address will not be published. Required fields are marked *

Get In Touch

Have a question? or perhaps spotted a problem?
Maybe you have something you would like to add. Drop us a line anytime!