Skip to content

Instantly share code, notes, and snippets.

@kurtschlatzer
Forked from BFTrick/shopping-redirect.php
Created September 14, 2016 17:06
Show Gist options
  • Save kurtschlatzer/9e35b13dd3c740a83dd8ebca13f0a430 to your computer and use it in GitHub Desktop.
Save kurtschlatzer/9e35b13dd3c740a83dd8ebca13f0a430 to your computer and use it in GitHub Desktop.
Change the Continue Shopping link on the WooCommerce Cart page
<?php
/**
* Return the permalink of the shop page for the continue shopping redirect filter
*
* @param string $return_to
* @return string
*/
function my_woocommerce_continue_shopping_redirect( $return_to ) {
return get_permalink( wc_get_page_id( 'shop' ) );
}
add_filter( 'woocommerce_continue_shopping_redirect', 'my_woocommerce_continue_shopping_redirect', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment