-
-
Save anonymous/aae3fc765a491a4842e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Redirect users after add to cart. | |
*/ | |
function my_custom_add_to_cart_redirect( $url ) { | |
$url = wc_get_checkout_url(); | |
return $url; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'my_custom_add_to_cart_redirect' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment