Skip to content

Instantly share code, notes, and snippets.

@ofernandolopes
Forked from woogist/functions.php
Last active August 29, 2015 14:21
Show Gist options
  • Save ofernandolopes/5f8d2395c374bcd81fbb to your computer and use it in GitHub Desktop.
Save ofernandolopes/5f8d2395c374bcd81fbb to your computer and use it in GitHub Desktop.
WooCommerce - Redirect to the shop page after add to cart
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