Created
May 31, 2016 23:18
-
-
Save BFTrick/a082106566c7b9d5b12a011e22bb5e67 to your computer and use it in GitHub Desktop.
Redirect add to cart action to Shop page
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 | |
// credit: WooThemes https://gist.github.com/woogist/6fd2d358bb2e51a25ac5 | |
add_filter( 'woocommerce_add_to_cart_redirect', 'patricks_custom_cart_redirect' ); | |
function patricks_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