Remove Cart and Checkout Buttons from WooCommerce Mini Cart

We recently developed a one product website for a client and the cart page step was unnecessary and we wanted to remove the “Continue to cart” button from WooCommerce mini cart and keep on checkout to direct customers directly to checkout.

Add the snippets below to your theme’s functions.php file:

Remove cart button from mini cart.

remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_button_view_cart', 10 );

Remove checkout button from mini cart.

remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );

Leave a Reply

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

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.