Created
July 16, 2015 18:08
-
-
Save BurlesonBrad/11603d084abc109b9e85 to your computer and use it in GitHub Desktop.
For WarFarePlugins
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
/** | |
* Redirect user to checkout page directly after adding to cart | |
* | |
* @return string | |
*/ | |
function wc_redirect_to_checkout() { | |
$checkout_url = WC()->cart->get_checkout_url(); | |
return $checkout_url; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'wc_redirect_to_checkout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment