Skip to content

Instantly share code, notes, and snippets.

@woogists
Last active November 30, 2021 10:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogists/689b375f3ac8f03632f3c9e53e78b0d5 to your computer and use it in GitHub Desktop.
Save woogists/689b375f3ac8f03632f3c9e53e78b0d5 to your computer and use it in GitHub Desktop.
[Customizing checkout fields using actions and filters] Empty cart redirect url
/**
* Changes the redirect URL for the Return To Shop button in the cart.
*/
function wc_empty_cart_redirect_url() {
return 'http://example.url/category/specials/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment