Created
November 14, 2016 01:11
-
-
Save trangsihung/e32cf6fbdaf67588565559f7bd6b86b9 to your computer and use it in GitHub Desktop.
woocommerce
This file contains hidden or 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 checkout redirect | |
function custom_add_to_cart_redirect() { | |
$checkout_ = get_permalink( get_option( 'woocommerce_checkout_page_id' ) ); | |
return $checkout_ | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment