Skip to content

Instantly share code, notes, and snippets.

@xardit
Created June 7, 2023 21:41
Show Gist options
  • Save xardit/b47146070f068e15fd27e3a86732ab2e to your computer and use it in GitHub Desktop.
Save xardit/b47146070f068e15fd27e3a86732ab2e to your computer and use it in GitHub Desktop.
WP Woocommerce - Redirect ADD TO CART > CHECKOUT PAGE for faster checkout
<?php
// redirect Add To Cart > Checkout
add_filter ('woocommerce_add_to_cart_redirect', function( $url, $adding_to_cart ) {
return wc_get_checkout_url();
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment