Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save jamiemarsland/5ee8f104bc6b19ca8e14d1414549c508 to your computer and use it in GitHub Desktop.
Save jamiemarsland/5ee8f104bc6b19ca8e14d1414549c508 to your computer and use it in GitHub Desktop.
Change the WooCommerce 'return to shop' button link (with thanks to Nicola Mustone)
/**
* Changes the redirect URL for the Return To Shop button in the cart.
*
* @return string
*/
function wc_empty_cart_redirect_url() {
return 'http://yourdomain.com/your-page/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
@nozola
Copy link

nozola commented Feb 21, 2018

This is great, thanks!

@tara2
Copy link

tara2 commented Mar 9, 2018

Yes, have just used it now and it was great for me too - big thanks!!

@crossedeyedgoat
Copy link

Hey!!! It works. Thanx a million.

@jodyshop
Copy link

jodyshop commented May 21, 2018

Awesome, Will try it on my Jodyshop.com shopping website :) Hope it works as expected!

@hurabg
Copy link

hurabg commented Jul 12, 2018

hi i am making a login for customer and want them to see only their company products. could anyone please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment