Customers can review their order before proceeding to the checkout page to make the payment. They can also delete an item from their virtual basket or increase the quantity of added items.
After the order is finalized, the customer clicks on the Proceed to Checkout button to go to the Checkout page.
There are some cases you may want customers in your store to skip the checkout page and instead go directly to the payment gateway page, where payments are made.
For example, in stores that accept PayPal payments, customers can click the PayPal Checkout button below the Proceed to Checkout button.
Remove the Checkout Button WooCommerce
If your store accepts payments only through PayPal and no other payment method, the “Proceed to checkout” button becomes an overhead for the customer.
Let me show you how you can remove it or hide it.
Here are the steps that you need to follow:
- Log into your WordPress site and access the dashboard as the admin user
- From the dashboard menu, click on the Appearance Menu > Theme Editor Menu. When the theme editor page is opened, look for the theme functions file with the extension functions.php. Open this functions file to add the function to remove the ‘Proceed to Checkout’ button.
- Add the following line of code to the functions.php file:
remove_action( 'woocommerce_proceed_to_checkout','woocommerce_button_proceed_to_checkout', 20);
How the Code Works
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, customers in your store can directly go to the payment gateway page to make the payment, as shown in the screenshot above.
Conclusion
In summary, this post illustrates how it is easy to remove the ‘Proceed to Checkout’ button in WooCommerce. I recommend creating a child theme so that your changes are not lost during an upgrade.
The code snippet removes the button using a hook, so that is not rendered. If you are not familiar with editing code, please consider hiring a qualified WordPress developer.
Joe is an experienced full-stack web developer with a decade of industry experience in the LAMP & MERN stacks, WordPress, WooCommerce, and JavaScript – (diverse portfolio). He has a passion for creating elegant and user-friendly solutions and thrives in collaborative environments. In his spare time, he enjoys exploring new tech trends, tinkering with new tools, and contributing to open-source projects. You can hire me here for your next project.
Similar Articles
- How to Move Primary Menu Storefront WooCommerce
- How to Add Text Before the Price in WooCommerce » Add Text Before Price
- How to Change PayPal Icon On WooCommerce Checkout Page
- How to Hide Company Name Field WooCommerce Checkout Page
- How to Add a Trust or Secure Logo on WooCommerce Checkout Page
- How to Skip Cart and Redirect to Checkout Page WooCommerce
- How to Customize Storefront Checkout Page
- How to Check if a User is Logged In in WordPress
- How to Hide Quantity In Stock In WooCommerce
- How to Hide Any Tab My Account Page WooCommerce
- How to Hide the Weight of Product in WooCommerce
- How to Simplify Checkout Free Items Storefront Theme
- How to Change Proceed To Checkout Text In WooCommerce
- How to Hide Downloads From My Account WooCommerce
- How to Get Payment Methods in WooCommerce » Code Example
- How to Add Custom WooCommerce Payment Icons Checkout Page
- How to Hide Price When Out of Stock In WooCommerce
- What is WooCommerce Storefront Theme? [Answered]