Many WooCommerce retailer house owners make the error of enabling each out there cost technique. However we’ve discovered that having too many cost choices can really confuse your clients and even result in deserted carts.
Whereas operating WooCommerce shops, we’ve discovered that strategically limiting cost choices can enhance conversion charges and streamline your checkout course of. For instance, you would possibly wish to disable sure cost strategies based mostly on delivery places, product sorts, and even order totals.
The excellent news is that you should use the WooCommerce default settings or a plugin to regulate which cost strategies your clients can use. You simply must know the place to look and which settings to regulate.
On this information, we’ll present you many confirmed methods to disable cost strategies in WooCommerce. We’ll cowl many various situations, whether or not you wish to take away cost choices utterly or conditionally cover them based mostly on particular guidelines.


When to Disable WooCommerce Fee Strategies 💳
Managing cost gateways in WooCommerce isn’t nearly providing as many cost choices as attainable. Typically, you might want to prohibit cost strategies to enhance your enterprise operations and keep away from excessive transaction charges.
Limiting out there cost strategies may even enhance the client journey as a result of providing too many decisions at checkout will be complicated.
In our expertise, conserving it easy with simply Stripe for bank cards and PayPal works finest for many worldwide shops.
Nonetheless, for those who’re serving particular markets with native cost preferences, then you definitely would possibly want extra management over when and how you can show completely different cost choices.
Listed below are frequent situations whenever you would possibly wish to have a WooCommerce cost disabled:
- Cart Complete – For example, chances are you’ll require particular cost strategies for bigger orders. This may help cut back transaction prices for cost gateways that cost percentage-based charges. Or, you would possibly disable money on supply for high-value orders.
- Buyer Location – Some cost gateways solely work in particular areas. In that case, chances are you’ll want to cover them from clients who dwell exterior of these areas. Equally, some cost extra in particular areas, so that you may not wish to provide them in sure areas.
- Person Function – You may arrange cost gateways based mostly on consumer roles, corresponding to providing wholesale clients completely different cost choices than common patrons. Once more, this may be helpful to cut back transaction charges or threat for orders with larger worth tags.
- Particular Durations – You would possibly want to alter cost choices throughout vacation gross sales occasions, particularly if these cost strategies may decelerate order processing.
All that stated, let’s take a look at 5 alternative ways you possibly can disable cost gateways in your WooCommerce retailer.
You should use the short hyperlinks beneath to skip to your most well-liked technique:
Choice 1: Disable Fee Strategies Utilizing WooCommerce Settings (For All Clients)
WooCommerce really has built-in settings to disable cost strategies, so that you received’t want to put in a WooCommerce plugin for this method. That stated, the steps right here will rely a bit of on what you wish to do.
We’ll present you how you can disable your essential cost strategies, PayPal-specific choices, and Stripe strategies. That means, all of your bases are coated.
Please be aware that we suggest solely following one of many strategies on this part if you wish to utterly disable a cost possibility for all clients.
That’s as a result of these strategies don’t let you cover cost choices based mostly on particular standards like consumer roles or product classes.
Disable Your Important Fee Strategies
You may disable one in every of your essential cost strategies (corresponding to a whole cost gateway or direct financial institution transfers) instantly in your WooCommerce settings.
Merely go to WooCommerce » Settings. Then, navigate to the ‘Funds’ tab. As soon as there, you’ll see all out there cost gateways in WooCommerce.


We’ve got enabled the next cost strategies: Stripe for credit score and debit playing cards, direct financial institution switch, test funds, money on supply, and PayPal.
Right here’s what the checkout appears to be like wish to clients when all of these choices are energetic:


To disable a WooCommerce cost, merely click on the toggle swap beneath the ‘Enabled’ column for any energetic cost technique.
Now, the cost possibility will not seem in your checkout web page.


In case you determine you wish to allow a few of these cost strategies once more later, you possibly can at all times return to this web page to reactivate them.
Whenever you go to your checkout web page, it is best to not see the disabled cost strategies:


Disable PayPal’s Various Fee Strategies
When you’ve got a number of cost strategies enabled through PayPal, then you possibly can simply prohibit them, too. For example, your enterprise may not have the ability to settle for Venmo funds, so chances are you’ll wish to flip off this feature.


First, you should use the identical technique we mentioned above.
Go to WooCommerce » Settings » Funds. Then, you possibly can click on the toggle swap for any cost technique labeled ‘(through PayPal).’


Alternatively, you possibly can click on the ‘Administer’ button subsequent to the PayPal possibility.
It will take you to the PayPal settings web page.


On the PayPal settings web page, scroll down till you discover the ‘Various Fee Strategies’ part.
Within the ‘Disable Various Fee Strategies’ discipline, sort within the particular CMS cost strategies you wish to cover out of your checkout web page.


When you’ve made your decisions, scroll down and click on ‘Save Adjustments.’
Now, your chosen cost strategies can be disabled.


At this stage, you possibly can go to your checkout web page to see in case your different cost strategies have disappeared.
Right here’s what occurs if we disable the credit score or debit playing cards possibility as a PayPal different cost technique:


👋 Observe: PayPal robotically reveals location-specific different cost strategies to your clients. For instance, clients within the Netherlands will see iDEAL as a cost possibility, whereas clients in different areas will solely see cost strategies related to their location.
Disable Fee Strategies Enabled by Stripe
When utilizing Stripe as your cost gateway in WooCommerce, it robotically permits a number of cost choices. These embody bank cards, debit playing cards, and even some native cost choices based mostly in your area, like Alipay and WeChat.


To enhance the client expertise, you would possibly wish to prohibit cost strategies to solely these your clients really use.
This manner, folks don’t get confused or unintentionally run into points after selecting a way that received’t work for them.
To do that, go to WooCommerce » Settings » Funds. Then, click on the ‘Administer’ button subsequent to the Stripe possibility.


On the following web page, scroll right down to the ‘Funds accepted on checkout’ part.
Right here, you possibly can disable cost strategies by unchecking those you don’t wish to provide.


Stripe affords quite a few cost gateways in WooCommerce, together with Apple Pay, Google Pay, Alipay, Klarna, Affirm, and AfterPay.
You’ll want to solely allow the particular cost choices that make sense for your enterprise and your clients.
When you’ve chosen your most well-liked cost strategies, scroll down and click on ‘Save Adjustments.’


👋 Observe: Stripe shows cost strategies based mostly in your retailer’s foreign money settings. For instance, SEPA Direct Debit will solely seem as a cost possibility when your retailer is ready to make use of EUR (Euro) as its foreign money.
Right here’s what our checkout web page appears to be like like after ACH Direct Debit and Alipay are disabled:


Choice 2: Set Up Conditional Fee Gateways With a Free Module (Simple + Customizable)
Have you ever ever needed to point out completely different cost choices to completely different clients? That’s precisely what conditional cost gateways do – they present or cover cost strategies based mostly on particular “if/then” guidelines.
For instance, you would possibly wish to:
- Disable money on supply for worldwide clients (as a result of this isn’t operationally attainable).
- Disable financial institution transfers for digital merchandise (since this stuff are delivered immediately, this may help forestall fraud).
- Disable sure cost choices for bigger orders (to cut back transaction charges).
That is excellent for companies like worldwide retailers that want completely different cost strategies by nation, luxurious manufacturers that need safe cost choices for high-value purchases, and wholesale shops that supply particular cost phrases for bulk patrons.
The free Disable Fee Methodology for WooCommerce plugin makes establishing conditional cost choices simple and free. You may create guidelines based mostly on delivery zones, cart totals, consumer roles, time of day, and extra, with out touching any code.
First, you might want to set up and activate the plugin. In case you’re new to this course of, take a look at our step-by-step information on how you can set up a CMS plugin for rookies.
After you activate the plugin, go to ‘Fee Methodology’ in your CMS admin space. Then, click on the ‘+ Add disable cost technique rule’ button to start out customizing your WooCommerce cost strategies.


Now, let’s discover the essential settings. On the high, you’ll discover the ‘Standing’ swap. This prompts or deactivates every rule to disable cost strategies.
Below ‘Rule sort,’ you possibly can select between two choices: disable particular cost strategies or cost additional charges for cost processing. For this tutorial, we’ll choose the primary possibility.
That being stated, the second possibility is nice if you wish to go processing charges for sure cost strategies – for instance, including a small payment for bank card funds.
If you wish to be taught extra about this, take a look at our information on how you can go cost processing charges to clients in CMS.


Subsequent, let’s give the rule a descriptive title. Utilizing clear, descriptive names on your cost guidelines makes it simpler to handle a number of conditional cost settings later.
For instance, for those who’re disabling Purchase Now Pay Later choices, you would possibly title it ‘Disable BNPL strategies.’
Now, within the ‘Disable this cost strategies*’ field, choose which choices you’d wish to disable.


Within the field beneath that, you may as well optionally disable cost strategies for particular currencies, which is nice for those who run a multi-currency WooCommerce retailer. This feature is especially helpful for worldwide shops the place sure cost gateways solely work with particular currencies.
In our instance, we’ll disable cost gateways like Klarna, Affirm, and Afterpay, as these are all Purchase Now Pay Later providers.
Shifting down, you’ll discover the part for establishing conditional cost guidelines. In ‘Under situations decide when to disable cost strategies,’ you will have two choices.
‘All of the beneath guidelines ought to match’ implies that each situation you set should be true for the cost technique to be disabled. For instance, for those who set situations for each cart complete and consumer function, then clients should meet each situations earlier than the cost technique disappears.
‘Any one of many beneath rule ought to match’ means the cost technique can be disabled when only one situation is met. So, for those who set guidelines for both cart complete or consumer function, assembly simply one in every of these situations will cover the cost possibility.
For this instance, we are going to use the primary possibility.


Now, click on on the ‘Choose situation’ dropdown menu. Right here, you’ll discover a number of classes to create conditional cost guidelines, together with location, product, supply technique, cart complete, date and time, and consumer function.
For example, let’s arrange a cost gateway for particular cart values. We’ll select ‘Cart Subtotal (Earlier than Low cost)’ from the ‘Cart Associated’ class to disable cost strategies like Purchase Now Pay Later choices when orders exceed a certain quantity.
This helps cut back faux orders and fraud for higher-value purchases in your WooCommerce retailer.


Subsequent, you possibly can select whether or not to disable cost strategies when the situation is:
- Equal to (=)
- Much less or Equal to (<=)
- Lower than (<)
- Larger or equal to (>=)
- Larger than (>)
- Not equal to (!=)
In our instance, we’ll use ‘Larger or equal to’ since we wish to disable sure cost gateways in WooCommerce when orders attain or exceed our threshold quantity.


Lastly, enter your goal worth within the final discipline.
In our case, we’ll sort in ‘250.’ Because of this when a buyer’s cart reaches $250 or extra, WooCommerce will disable the Purchase Now Pay Later cost strategies we chosen earlier.


One factor we love about this plugin is that you may create advanced conditional cost guidelines by combining a number of situations.
For instance, you may prohibit cost choices based mostly on cart totals and particular dates. This might work completely for managing cost strategies throughout vacation gross sales durations.
So as to add one other situation to your WooCommerce cost guidelines, merely click on the inexperienced ‘Add Situation’ button. After that, comply with the identical steps.
Every new situation helps you fine-tune precisely when and the way cost strategies seem in your checkout web page.


When you’re pleased together with your conditional cost guidelines, click on ‘Save Rule.’
The cost strategies you’ve chosen will robotically be hidden in your WooCommerce checkout when clients meet your specified situations.


Now, let’s take a look at a couple of examples of how you can arrange cost gateway guidelines for different enterprise wants:
Disable Money on Supply for Worldwide Clients
Do you promote merchandise internationally and provide money on supply?
In that case, it is best to disable this cost technique for worldwide clients. It will keep away from cost assortment points and cut back delivery dangers.
To do that, you possibly can create a brand new rule and title it one thing like ‘Disable COD for Non-[Country Name] Clients.’ Then, choose ‘Money on supply’ within the cost strategies part.


For the situation, select ‘Nation’ from the placement choices and choose ‘Not Equal to (!=).’
After that, enter your retailer’s nation.


Now, the cash-on-delivery cost technique will solely seem for native clients. On the identical time, will probably be robotically hidden for anybody ordering from different international locations.
Right here’s how our checkout web page seems when considered as a buyer from Japan:


Disable Financial institution Transfers for Digital Merchandise
Digital merchandise want particular care as a result of they’re delivered straight away, and financial institution transfers will be dangerous as a result of sluggish processing instances. For that reason, we suggest disabling this cost possibility on your digital items.
First, be sure all of your digital merchandise are in the identical class (like ‘Digital merchandise’). In case you haven’t sorted your merchandise but, take a look at our information on how you can add product tags, attributes, and classes in WooCommerce.
Then, create a brand new rule and title it ‘Disable Financial institution Switch for Digital Merchandise.’ Decide ‘Direct financial institution switch’ because the cost technique you wish to disable.


For the situation, you possibly can select ‘Cart has product of class’ from the product choices.
Then, choose your digital merchandise class.


And also you’re achieved!
Now, when somebody buys an merchandise from the digital product class, they received’t see the financial institution switch possibility at checkout.


Disable Particular Fee Strategies for Massive Orders
When you’ve got ever processed giant orders in your WooCommerce retailer, then you already know that percentage-based cost gateway charges can take an enormous chunk out of your earnings.
For instance, PayPal fees 2.99% + a hard and fast payment. On a $1,000 order, that’s round $30 in charges!
So, right here’s how you can arrange conditional cost gateways to supply cheaper cost choices for high-value purchases.
For this instance, we’ll concentrate on PayPal since its percentage-based charges can grow to be notably costly for small enterprise house owners dealing with giant transactions.
First, create a brand new rule and title it ‘Disable PayPal for Excessive-Worth Orders.’ Choose ‘PayPal’ out of your WooCommerce cost strategies.


In ‘Under situations decide when to disable cost strategies,’ select ‘Any one of many beneath rule ought to match.’
For the primary situation, you might want to choose ‘Cart Subtotal (Earlier than low cost),’ choose ‘Larger or equal to,’ and enter ‘1000’ (regulate this quantity based mostly in your cost gateway charges).
For the second situation, select ‘Cart amount,’ choose ‘Larger than or equal to,’ and enter ’10’ (or no matter quantity is smart for your enterprise).


Now, when a buyer’s order meets both situation – spending $1000 or extra, OR ordering 10 or extra objects – PayPal received’t seem as a cost possibility at checkout.
You may place a check order and go to your checkout web page to see if the foundations work:


Choice 3: Use Wholesale Suite to Prohibit Fee Strategies (For Wholesale Clients)
In case you provide wholesale pricing, then you definitely’ll probably wish to set completely different cost gateways based mostly on consumer function. It’s possible you’ll wish to provide common clients all the usual cost strategies however restrict them for wholesale clients.
This manner, you possibly can maximize your earnings and reduce any cost safety dangers.
For example, wholesale clients usually make very giant purchases, and sure cost choices (like PayPal) have larger charges. To keep away from these steep charges reducing into earnings, you may disable PayPal for wholesale customers.
Equally, you would possibly flip off Purchase Now Pay Later choices so that you don’t have to attend for an prolonged interval for big sums of cash (or threat by no means receiving them).
When you can arrange conditional cost gateways utilizing the plugin from Choice 2, wholesale plugins sometimes already embody this function.
The Wholesale Suite plugin bundle, for instance, has built-in plugins to handle cost strategies based mostly on wholesale consumer roles. This may enhance the client expertise on your B2B patrons.
To get began, go forward and set up these CMS plugins from the Wholesale Suite in your on-line retailer:
Whereas the Professional model comes with a price ticket, it unlocks important wholesale options, together with cost technique management and tiered pricing.
You may learn our detailed Wholesale Suite evaluation for extra data.
As soon as each plugins are energetic, be sure to have your wholesale retailer fundamentals in place. Listed below are some useful tutorials you possibly can comply with:
To limit particular cost strategies to wholesale clients, you possibly can go to Wholesale » Settings. Then, choose ‘Fee Gateway.’


Subsequent to ‘Wholesale Function,’ choose the ‘Wholesale Buyer’ function that the plugin has arrange. Then, sort within the cost gateways you wish to allow.
As soon as achieved, simply click on ‘Add Mapping.’


It’s best to now see all the enabled cost gateways within the desk beneath.
Like so:


Now, if the consumer logs in as a Wholesale Buyer, they’ll solely see this particular cost technique on their checkout web page.
Right here’s an instance:


Choice 4: Use Superior Coupons to Prohibit Fee Strategies (For Particular Coupons)
Need to provide rewards for utilizing sure cost strategies?
You are able to do this by creating coupons tied to particular cost choices, which inspires clients to make use of these most well-liked cost strategies.
Whereas the plugin from Choice 2 on this information can deal with this activity, coupon plugins like Superior Coupons embody this function by default. We love this plugin as a result of it permits you to create detailed guidelines and customizations on your payment-specific reductions.
First, you might want to set up these CMS plugins in your CMS admin space:
The premium model is paid, however you’ll want it to limit cost strategies and create superior coupon guidelines. For extra data, take a look at our full Superior Coupons evaluation.
Subsequent, arrange your coupons by going to Coupons » Add New.


Then, you possibly can configure your coupon settings nonetheless you want. For detailed directions, learn our step-by-step information on how you can create good coupons in WooCommerce.
For this tutorial, we’ll concentrate on creating payment-specific reductions. We’ll create a coupon code referred to as PAYPAL20 that provides clients a 20% low cost once they select PayPal as their cost technique.


To limit the cost technique for the coupon, scroll down and discover the ‘Fee Strategies Restriction’ tab. Verify the field that claims ‘When checked, will allow cost strategies restriction test when coupon is utilized.’
For the ‘Sort,’ it’s important to choose ‘Allowed.’


Then, in ‘Fee Strategies,’ enter PayPal.
After that, be happy to proceed establishing your coupon. For instance, you possibly can create an auto-apply coupon URL and share it together with your potential clients.


When you’re completed configuring these settings, click on ‘Replace’ or ‘Publish’ to save lots of your coupon.
It’s so simple as that!


When clients use this coupon, they’ll see PayPal as the one cost technique.
The low cost can even be utilized to their order abstract.


Choice 5: Add Bespoke Code to Disable Fee Strategies (Superior + No Module)
In case you don’t wish to use a devoted cost plugin, then you may as well get the identical outcomes with a number of strains of customized code. We’ll present you how you can disable cost strategies based mostly on two frequent situations: buyer location (nation) and cart complete.
Remember the fact that this method is extra technical than the earlier choices. It requires including code to your capabilities.php file, which controls how your CMS web site behaves.
Nonetheless, we don’t suggest enhancing your capabilities.php file instantly, as making even a small mistake can break your total web site. As an alternative, we propose utilizing WPCode, which is a code snippet supervisor that helps you add customized code safely.
Whereas it’s a plugin, it’s a light-weight device for a lot of customizations past cost strategies, corresponding to including monitoring codes, customized capabilities, or analytics.
You may learn our full WPCode evaluation and our information on probably the most helpful CMS code snippets for rookies to see what you are able to do with WPCode.
Earlier than we begin, we have to know the ID of the cost gateway that we wish to disable. To do that, simply go to WooCommerce » Settings and swap to the ‘Funds’ tab.


Then, hover your cursor over one of many cost strategies.
As you do that, take note of the URL preview that seems on the backside of your browser. It ought to look one thing like this: https://instance.com/wp-admin/admin.php?web page=wc-settings&tab=checkout&part=payment-gateway-id
The half on the finish that follows &part=
is your cost gateway ID. So, for instance, for those who hover over the PayPal possibility, then the ID is ppcp-gateway
.


Make sure that to pay attention to this data, as you have to it within the subsequent steps.
Now, set up WPCode in your CMS web site. You may learn our step-by-step information on how you can set up a CMS plugin for detailed directions.
Subsequent, go to Code Snippets » + Add Snippet. Then, select ‘Add Your Bespoke Code (New Snippet)’ and click on on the ‘+ Add Bespoke Snippet’ button.


After that, you’ll want to decide on a code sort.
For this tutorial, choose ‘PHP Snippet.’


Now, let’s take a look at two code snippets you possibly can add to disable particular cost strategies in WooCommerce.
Disable Fee Strategies Based mostly on Nation
To do that, you might want to give your code snippet a reputation like ‘Disable [Payment Method Name] for [Country Name].’
After that, you possibly can paste the code snippet beneath into the ‘Code Preview’ field:
// Hook our customized operate into the WooCommerce out there cost gateways filter.
add_filter( 'woocommerce_available_payment_gateways', 'customize_payment_gateway_based_on_country', 9999 );
operate customize_payment_gateway_based_on_country( $available_gateways ) {
// Verify if we're within the admin space or if the WooCommerce buyer object shouldn't be out there.
// If both is true, return the unmodified gateways.
if ( is_admin() || ! WC()->buyer ) {
return $available_gateways;
}
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Fee Gateway ID
//
// Substitute 'your_gateway_id' with the ID of the cost gateway you wish to goal.
// For instance:
// - To focus on Stripe, change with 'stripe'
// - To focus on PayPal, change with 'paypal'
//
$gateway_id_placeholder="your_gateway_id";
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Nation Code
//
// Substitute 'XX' with the specified nation code the place you wish to disable the gateway.
// Nation codes are based mostly on ISO 3166-1 alpha-2.
// For instance:
// - To focus on the USA, use 'US'
// - To focus on the UK, use 'GB'
//
$target_country_code="XX";
// -----------------------------------------------------------------------
// Verify if the required cost gateway exists throughout the out there gateways.
if ( isset( $available_gateways[ $gateway_id_placeholder ] ) ) {
// Retrieve the billing nation of the present buyer.
$customer_country = WC()->customer->get_billing_country();
// Evaluate the client's billing nation with the goal nation code.
if ( $customer_country === $target_country_code ) {
// If the client's nation matches the goal, take away the cost gateway.
unset( $available_gateways[ $gateway_id_placeholder ] );
}
}
// Return the (probably modified) record of obtainable gateways.
return $available_gateways;
}
Now, you’ll must customise two elements of this code.
First, discover the $gateway_id_placeholder
variable and change ‘your_gateway_id’ with the ID of your cost gateway.
Discover the $target_country_code
variable and change ‘XX’ together with your goal nation’s two-letter code. For instance:
- US – United States
- GB – United Kingdom
- CA – Canada
- AU – Australia
So, let’s say you wish to disable direct financial institution transfers for patrons in the USA. In that case, then your code ought to appear like this:
// Hook our customized operate into the WooCommerce out there cost gateways filter.
add_filter( 'woocommerce_available_payment_gateways', 'customize_payment_gateway_based_on_country', 9999 );
operate customize_payment_gateway_based_on_country( $available_gateways ) {
// Verify if we're within the admin space or if the WooCommerce buyer object shouldn't be out there.
// If both is true, return the unmodified gateways.
if ( is_admin() || ! WC()->buyer ) {
return $available_gateways;
}
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Fee Gateway ID
//
// Substitute 'your_gateway_id' with the ID of the cost gateway you wish to goal.
// For instance:
// - To focus on Stripe, change with 'stripe'
// - To focus on PayPal, change with 'ppcp-gateway'
//
$gateway_id_placeholder="bacs";
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Nation Code
//
// Substitute 'XX' with the specified nation code the place you wish to disable the gateway.
// Nation codes are based mostly on ISO 3166-1 alpha-2.
// For instance:
// - To focus on the USA, use 'US'
// - To focus on the UK, use 'GB'
//
$target_country_code="US";
// -----------------------------------------------------------------------
// Verify if the required cost gateway exists throughout the out there gateways.
if ( isset( $available_gateways[ $gateway_id_placeholder ] ) ) {
// Retrieve the billing nation of the present buyer.
$customer_country = WC()->customer->get_billing_country();
// Evaluate the client's billing nation with the goal nation code.
if ( $customer_country === $target_country_code ) {
// If the client's nation matches the goal, take away the cost gateway.
unset( $available_gateways[ $gateway_id_placeholder ] );
}
}
// Return the (probably modified) record of obtainable gateways.
return $available_gateways;
}
This code will cover the direct financial institution switch possibility when clients from the USA go to your checkout web page.
When you’ve personalized these elements, swap the toggle from ‘Inactive’ to ‘Lively,’ then click on ‘Save Snippet.’


Now, you possibly can go forward and place a check order to see if the code works.
Right here’s what our checkout web page appears to be like like once we use the pattern code snippet for disabling PayPal for US-based clients:


Disable Fee Strategies Based mostly on Cart Complete
First, create a brand new code snippet and provides it a descriptive title, like ‘Disable [Payment Method] for Excessive-Worth Orders.’
After that, paste the next code snippet into the ‘Code Preview’ field:
// Hook our customized operate into the WooCommerce out there cost gateways filter.
add_filter( 'woocommerce_available_payment_gateways', 'disable_payment_gateway_for_high_cart_subtotal' );
operate disable_payment_gateway_for_high_cart_subtotal( $available_gateways ) {
// Verify if we're within the admin space. In that case, return the unmodified gateways to keep away from points within the backend.
if ( is_admin() ) {
return $available_gateways;
}
// Get the cart subtotal.
$cart_total = WC()->cart->get_subtotal();
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Minimal Cart Subtotal
// Substitute 123 with the specified minimal cart subtotal above which you wish to disable the gateway.
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Fee Gateway ID
// Substitute 'your_gateway_id' with the ID of the cost gateway you wish to goal.
// For instance:
// - To focus on Stripe, change with 'stripe'
// - To focus on PayPal, change with 'ppcp-gateway'
// -----------------------------------------------------------------------
// Verify if the cart complete meets the minimal and if the required cost gateway is out there.
if ( $cart_total >= 123 && isset( $available_gateways['your_gateway_id'] ) ) {
// Take away the cost gateway.
unset( $available_gateways['your_gateway_id'] );
}
// Return the (probably modified) record of obtainable gateways.
return $available_gateways;
}
You’ll must customise two elements of this code. First, discover the cart subtotal worth on this line:if ( $cart_total >= 123 && isset( $available_gateways['your_gateway_id'] ) ) {
Merely change ‘123’ together with your desired minimal quantity (don’t embody foreign money symbols).
Subsequent, discover ‘your_gateway_id’ and change it together with your cost gateway ID like earlier than.
So, if you wish to disable PayPal for orders over $100, you’ll set the worth to ‘100’ and use ‘ppcp-gateway’ because the gateway ID.
Right here’s what the total code snippet would appear like:
// Hook our customized operate into the WooCommerce out there cost gateways filter.
add_filter( 'woocommerce_available_payment_gateways', 'disable_payment_gateway_for_high_cart_subtotal' );
operate disable_payment_gateway_for_high_cart_subtotal( $available_gateways ) {
// Verify if we're within the admin space. In that case, return the unmodified gateways to keep away from points within the backend.
if ( is_admin() ) {
return $available_gateways;
}
// Get the cart subtotal.
$cart_total = WC()->cart->get_subtotal();
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Minimal Cart Subtotal
// Substitute 123 with the specified minimal cart subtotal above which you wish to disable the gateway.
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Fee Gateway ID
// Substitute 'your_gateway_id' with the ID of the cost gateway you wish to goal.
// For instance:
// - To focus on Stripe, change with 'stripe'
// - To focus on PayPal, change with 'ppcp-gateway'
// -----------------------------------------------------------------------
// Verify if the cart complete meets the minimal and if the required cost gateway is out there.
if ( $cart_total >= 100 && isset( $available_gateways['ppcp-gateway'] ) ) {
// Take away the cost gateway.
unset( $available_gateways['ppcp-gateway'] );
}
// Return the (probably modified) record of obtainable gateways.
return $available_gateways;
}
When you’ve personalized these elements, swap the toggle from ‘Inactive’ to ‘Lively.’
Then, click on ‘Save Snippet.’


Lastly, attempt making a check order to see if the code works.
Right here’s what it is best to see in your checkout web page for those who disable PayPal for orders above $100:


Extra Methods to Enhance Your WooCommerce Retailer
Now that you know the way to handle cost strategies in WooCommerce, listed here are different issues you are able to do to construct a greater on-line retailer:
🚨 Able to take your on-line retailer to the following stage? Let our WPBeginner Professional Companies crew provide help to construct an expert WooCommerce retailer. We’ll arrange your cost gateways, optimize your checkout course of, and guarantee your retailer runs easily. Plus, you’ll get a devoted venture supervisor to supervise each element of your retailer setup.
E-book a Free Session Name With Our Workforce As we speak!
We hope this text has helped you learn to disable cost strategies in WooCommerce. You may additionally wish to take a look at our information on how you can add a free delivery bar in WooCommerce and our professional picks of the very best Authorize.web plugins for CMS.
In case you appreciated this text, then please subscribe to our YouTube Channel for CMS video tutorials. You too can discover us on Twitter and Fb.