“Continue Shopping” appears on the Cart page when an item is added to Cart and you have “Redirect to the cart page after successful addition” enabled via the WooCommerce settings.

By default, “Continue Shopping” button redirects to the previously visited page – sometimes this makes no sense and you might want to send them back to the main shop page instead (or a custom page).

Here’s a quick snippet to do just that. Enjoy!

The “Continue Shopping” link @ WooCommerce Cart

PHP Snippet: Change “Continue Shopping” Redirect

/**
 * @snippet       Continue Shopping Link - WooCommerce Cart
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 3.6.2
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_filter( 'woocommerce_continue_shopping_redirect', 'bbloomer_change_continue_shopping' );

function bbloomer_change_continue_shopping() {
	return wc_get_page_permalink( 'shop' );
}
Share:

Leave a Reply