If you’re rendering a service or selling integral goods, there are chances you don’t want your customers to use a particular payment method or any payment options at all on your checkout page.
How do you go about this, so it doesn’t force the user to either use a specific method or any payment gateway?
Our team at Themelocation is comprised of WordPress developers of high expertise
- We can maintain, support and manage your single, or all your clients, website with dedication
- Our skills are at your disposal.
Don’t worry! We are here for you.
We’re going to hold you by the hand and show you a super easy way to not only remove a certain payment method, but to also remove all payment options without breaking your site or pulling your hair off.
First, let take a look at how to change a specific payment method on the checkout page.
How to Change a Specific Payment Method on Checkout Page?
This is how your default checkout screen will look like at first:
In the above screenshot, you can see all the default payment gateways are all intact.
The next step now is to remove a specific payment method. Let’s say we want to remove cheque payment. Yes, cheque payment will be fine. Let’s go with that.
- The first step is to login to the Back-end of your site. Click the settings link under WooCommerce menu.
- Then, head straight to the checkout tab where you’ll see all the payment methods and their settings.
- Here’s how it looks like in the screenshots below:
4. To remove the check payment method, click on the cheque link. Here you’ll see the checkbox marked as checked. This checkbox will determine whether to enable/disable check payment option.
5. Now, Uncheck the cheque payment box and save changes.
- After that, go straight to the front end of your site, and refresh the checkout page. The cheque payment method will automatically disappear from your website.
Here’s how your webpage will now look like.
Awesome, right? With this simple method you can easily disable any payment gateway of your choice.
With that out of the way, let’s look out how to disable all payment methods on your checkout page.
How to Remove all Payment Methods?
We’re going to be using a different method here. The way to go is to add just a single line code to the functions.php file within your theme folder.
You can decide to use a plugin called code snippet.
Here’s the code:
Add to Functions.php
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
And Voila! The checkout page will now display only a “Place Order” button.
Pretty straightforward, right? Yeah, that’s how it is. I hope you have found this article very useful. Let me know if you want any further assistance.