Possible to bypass cart page and redirect to checkout page?
-
Hello,
Upon a user clicking a link that adds products to cart, is it possible to bypass the cart page and go straight to checkout? This would remove one more step for our customers and allow them to checkout even faster, which would be awesome.
I found this cart to checkout redirect script but it doesn’t work with your plugin (it works when your plugin is deactivated):
/**
* @snippet Redirect to Checkout Upon Add to Cart – WooCommerce
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055
* @sourcecode https://businessbloomer.com/?p=21607
* @author Rodolfo Melogli
* @compatible WC 3.3.3
*/function bbloomer_redirect_checkout_add_cart( $url ) {
$url = get_permalink( get_option( ‘woocommerce_checkout_page_id’ ) );
return $url;
}add_filter( ‘woocommerce_add_to_cart_redirect’, ‘bbloomer_redirect_checkout_add_cart’ );
?>
Thanks you!
Holden
- The topic ‘Possible to bypass cart page and redirect to checkout page?’ is closed to new replies.