Last active
December 7, 2023 06:22
-
-
Save SiR-DanieL/abd80494589d33149c0dd8fa27d8a28e to your computer and use it in GitHub Desktop.
How to Change the Continue Shopping Redirect URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_continue_shopping_redirect', 'custom_continue_shopping_redirect' ); | |
function custom_continue_shopping_redirect( $default ) { | |
//return home_url(); // Redirects to the Home page | |
//return wc_get_page_permalink( 'shop' ); // Redirects to the Shop page | |
//return get_permalink( get_option( 'page_for_posts' ) ); // Redirects to the Blog page | |
//return get_permalink( PAGE_ID ); // Redirects to the specific page by ID (Replace PAGE_ID with your ID | |
return $default; // Return to the default WooCommerce page | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment