Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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