Skip to content

Instantly share code, notes, and snippets.

@dr5hn
Created October 15, 2017 08:19
Show Gist options
  • Save dr5hn/0d0f259c2698171e424619fb4bdcff4d to your computer and use it in GitHub Desktop.
Save dr5hn/0d0f259c2698171e424619fb4bdcff4d to your computer and use it in GitHub Desktop.
Change Continue Shopping Link in within WooCommerce
<?php
/**
* Return the permalink of the shop page for the continue shopping redirect filter -- By Darshan Gada
*
* @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