-
-
Save ofernandolopes/5f8d2395c374bcd81fbb to your computer and use it in GitHub Desktop.
WooCommerce - Redirect to the shop page after add to cart
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
add_filter( 'woocommerce_add_to_cart_redirect', 'wc_custom_cart_redirect' ); | |
function wc_custom_cart_redirect() { | |
return get_permalink( wc_get_page_id( 'shop' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment