Site icon Experience Wordpress Developer Online – Design Develop and Maintenance Support

Add Continue Shopping button in Cart

You can add a Continue Shopping link to your cart page that allows customers to easily return to browsing products after adding something to the cart.

So, here is code. which you can add in your theme’s functions.php file of your active child theme (or theme). Save file and testing your cart page!

Now, if you’ll go to cart page again you’ll see Continue Shopping which will lead the user to shop page.

You can apply styling to your Continue Shopping link to make it look like a button.

add_action( 'woocommerce_after_cart_totals', 'continue_shopping_button' );
function continue_shopping_button() {
 $shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );
 
 echo '<div class="">';
 echo ' <a href="'.$shop_page_url.'" class="button">Continue Shopping →</a>';
 echo '</div>';
}

If you find another solution for ‘Add a Continue Shopping Button to WooCommerce’ than share your solution with us.

I would love to hear from you if you found this useful, would like to see something else, missing something or just a simple thank you.

Exit mobile version