Skip to content

Instantly share code, notes, and snippets.

@BFTrick
Created May 31, 2016 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFTrick/a082106566c7b9d5b12a011e22bb5e67 to your computer and use it in GitHub Desktop.
Save BFTrick/a082106566c7b9d5b12a011e22bb5e67 to your computer and use it in GitHub Desktop.
Redirect add to cart action to Shop page
<?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