Advertisement
Barbareshet

Woocommerce redirect to checkout after 'add to cart'

Oct 12th, 2020
2,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. /**
  2.  * Woocommerce redirect to checkout after 'add to cart'
  3.  */
  4. add_filter( 'woocommerce_add_to_cart_redirect', 'barbareshet_skip_cart_redirect_checkout' );
  5.  
  6. function barbareshet_skip_cart_redirect_checkout( $url ) {
  7.     return wc_get_checkout_url();
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement