Created
March 28, 2019 00:23
-
-
Save alvics/b884c3f1c252f1b44a3ded437683ffdb 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
// Woocommerce redirect "added to cart" to cart page | |
function ap_redirect_checkout_add_cart( $url ) { | |
$url = get_permalink( get_option( 'woocommerce_cart_page_id' ) ); | |
return $url; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'ap_redirect_checkout_add_cart' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment