Add Continue Shopping Button To WooCommerce Cart

The code below is the easiest way to add a Continue Shopping Button to the WooCommerce cart page. The shopping cart experience is critical to a successful e-commerce configuration.

Add the code below to your functions.php file. Below we have included some CSS for extra clean styling.

add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' );

function woo_add_continue_shopping_button_to_cart() {
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );

echo '

';
echo ' Continue Shopping →';
echo '

';
}

Continue Shopping Button CSS

Add the following CSS to the customizer CSS for a clean button. Adjust the colors to match your theme.

.woocommerce-message {
background-color: #fff !important;
}

.woocommerce-message a.button:hover {
color: #fff !important;
}
.woocommerce-message {
padding: 1em 2em 1em 3.5em;
margin: 0 0 0.5em;
position: relative;
background-color: #f7f6f7;
color: #515151;
border-top: 3px solid #f1f1f1;
list-style: none outside;
width: auto;
word-wrap: break-word;
}

Have you used our add Continue Shopping Button To WooCommerce Cart page snippet? Let us know in the comments below!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *