Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to remove the Proceed to checkout button from the Cart page in WooCommerce

The Cart Page of a WooCommerce store helps customers to review their order before proceeding to the Checkout page to make the payment for the same. It is on the Cart page where the customer can delete an item from their virtual basket or increase the quantity of added items. Once the order is finalised, the customer then clicks on the Proceed to checkout button to go to the Checkout page.

remove the Proceed to checkout button from the Cart page in WooCommerce - The WooCommerce Cart page
The WooCommerce Cart page

In many cases though, you may want the customer to skip the Checkout page and instead directly go to the Payment Gateway page and make the payment. As a real world example, for stores which accept payments mostly through PayPal, an exclusive button for it is added using plugins such as Express Checkout, in which case the customer can directly go to the PayPal page by clicking on the PayPal Check out button that appears below the Proceed to checkout button.

remove the Proceed to checkout button from the Cart page in WooCommerce - PayPal buttons added under Proceed to checkout button

 

In case of when the store accepts payments only through PayPal and no other payment method, the “Proceed to checkout” button becomes an overhead for the customer. For these instances, let’s see how we can remove the Proceed to checkout button on the WooCommerce cart page.

Removing the Proceed to checkout button from the Cart page

The following line of code, when added to the functions.php file of your child theme, will result in this button getting removed from the page:

function ts_remove_proceed_to_checkout_button() {
if (is_cart()) {
remove_action('woocommerce_cart_collaterals', 'woocommerce_cart_totals', 10);
}
}
add_action('template_redirect', 'ts_remove_proceed_to_checkout_button');

The woocommerce_button_proceed_to_checkout is a function that outputs the Checkout button. By removing this using the woocommerce_proceed_to_checkout hook, the button won’t be rendered.

In this way, your  customers can directly go to the payment gateway page to make the payment:

remove the Proceed to checkout button from the Cart page in WooCommerce - Proceed to checkout button removed

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
12 Comments
Newest
Oldest
Inline Feedbacks
View all comments
Thomas
1 year ago

Hi Anubha Bhat, Thanks for your clear explanation. I want to change the text of my ‘Proceed to checkout button’ but the text won’t change for the button. I am using Elementor PRO With the business subscription of wordpress. Is there maybe any code I can insert for a new ‘proceed to checkout button’ with custom text that I can use? This would absolutely mean the world to me, I have been looking over the whole internet and this post is the one that comes near my problem most. Looking forward to your reply so much. Kind regards, Thomas van… Read more »

Thomas
1 year ago
Reply to  Anubha Bhat

Hi Anhuba,

Thanks for your quick reply.

I added the lines of code to code snippets but the custom text did not appear in the designated button for ‘Proceed to checkout’. I think it is almost working but I cannot find out why it does not appear in the designated box. The button is also not deleted which is very strange.

Could you maybe look what I could do to help it and solve it?

This would mean the world to me.

Thomas

error_custom_checkout_button.jpg
Ann
3 years ago

This worked. Thanks!

4 years ago

Great post. Thank you!

Amaurydubois
4 years ago

Hello, can we do the same for the order button ?

Tina
5 years ago

Hi, thanks for your post. I think it can help me a lot. But There are so manly lines of code in functions.php file of my child theme, could you please tell me where exactly to add this line of code?

Launch Alert: Flexi BOGO for WooCommerce! Create irresistible holiday discount sales with ease.Learn more
12
0
Would love your thoughts, please comment.x
()
x