Created
April 25, 2019 21:11
-
-
Save PGeorgiev/8156a4c6cef2e48116fcd1e7507c8d3c 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 | |
/** | |
* Add to cart redirect to checkout. | |
* | |
* @param string $url | |
* @return string | |
*/ | |
function woocode_wc_add_to_cart_redirect_to_checkout( $url ) { | |
return wc_get_checkout_url(); | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'woocode_wc_add_to_cart_redirect_to_checkout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment