Many WooCommerce retailer house owners make the error of enabling each and every to be had price way. However we’ve discovered that having too many price choices can if truth be told confuse your shoppers or even result in deserted carts.
Whilst operating WooCommerce retail outlets, we’ve discovered that strategically proscribing price choices can strengthen conversion charges and streamline your checkout procedure. As an example, you may wish to disable positive price strategies in line with transport places, product varieties, and even order totals.
The excellent news is that you’ll be able to use the WooCommerce default settings or a plugin to keep watch over which price strategies your shoppers can use. You simply wish to know the place to appear and which settings to regulate.
On this information, we’ll display you many confirmed techniques to disable price strategies in WooCommerce. We’ll duvet many various situations, whether or not you need to take away price choices totally or conditionally conceal them in line with particular laws.

When to Disable WooCommerce Fee Strategies 💳
Managing price gateways in WooCommerce isn’t near to providing as many price choices as conceivable. Infrequently, you wish to have to limit price easy methods to strengthen what you are promoting operations and steer clear of excessive transaction charges.
Proscribing to be had price strategies may even strengthen the buyer adventure as a result of providing too many possible choices at checkout may also be complicated.
In our revel in, preserving it easy with simply Stripe for bank cards and PayPal works very best for many global retail outlets.
On the other hand, if you happen to’re serving particular markets with native price personal tastes, then you may want extra keep watch over over when and tips on how to show other price choices.
Listed here are not unusual situations whilst you may wish to have a WooCommerce price disabled:
- Cart Overall – As an example, you could require particular price strategies for better orders. It will lend a hand scale back transaction prices for price gateways that fee percentage-based charges. Or, you may disable coins on transport for high-value orders.
- Buyer Location – Some price gateways handiest paintings in particular areas. If that’s the case, you could wish to conceal them from shoppers who are living out of doors of the ones spaces. In a similar fashion, some fee extra in particular areas, so you may now not wish to be offering them in positive areas.
- Consumer Position – You’ll be able to arrange price gateways in line with consumer roles, similar to providing wholesale shoppers other price choices than common patrons. Once more, this may also be helpful to cut back transaction charges or chance for orders with increased value tags.
- Particular Classes – You may wish to alternate price choices all over vacation gross sales occasions, particularly if the ones price strategies may decelerate order processing.
All that stated, let’s have a look at 5 other ways you’ll be able to disable price gateways on your WooCommerce retailer.
You’ll be able to use the fast hyperlinks underneath to skip on your most popular way:
- Choice 1: Disable Fee Strategies The use of WooCommerce Settings (For All Shoppers)
- Choice 2: Set Up Conditional Fee Gateways With a Unfastened Plugin (Simple + Customizable)
- Choice 3: Use Wholesale Suite to Limit Fee Strategies (For Wholesale Shoppers)
- Choice 4: Use Complex Coupons to Limit Fee Strategies (For Particular Coupons)
- Choice 5: Upload Customized Code to Disable Fee Strategies (Complex + No Plugin)
👉 Word: On this article, we will be able to think that you’ve got already arrange a WooCommerce retailer. If you wish to have lend a hand, you’ll be able to learn our information on tips on how to get started a web based retailer or our WooCommerce made easy educational.
Choice 1: Disable Fee Strategies The use of WooCommerce Settings (For All Shoppers)
WooCommerce if truth be told has integrated settings to disable price strategies, so that you gained’t wish to set up a WooCommerce plugin for this means. That stated, the stairs right here will rely somewhat on what you need to do.
We’ll display you tips on how to disable your primary price strategies, PayPal-specific choices, and Stripe strategies. That means, your whole bases are coated.
Please word that we suggest handiest following one of the vital strategies on this segment if you wish to totally disable a price possibility for all shoppers.
That’s as a result of those strategies don’t help you conceal price choices in line with particular standards like consumer roles or product classes.
How one can Disable Your Primary Fee Strategies
You’ll be able to disable one among your primary price strategies (similar to a whole price gateway or direct financial institution transfers) without delay on your WooCommerce settings.
Merely cross to WooCommerce » Settings. Then, navigate to the ‘Bills’ tab. As soon as there, you’ll see all to be had price gateways in WooCommerce.

We’ve got enabled the next price strategies: Stripe for credit score and debit playing cards, direct financial institution switch, take a look at bills, coins on transport, and PayPal.
Right here’s what the checkout looks as if to shoppers when all of the ones choices are energetic:

To disable a WooCommerce price, merely click on the toggle transfer below the ‘Enabled’ column for any energetic price way.
Now, the price possibility will not seem in your checkout web page.

If making a decision you need to allow a few of the ones price strategies once more later, you’ll be able to all the time go back to this web page to reactivate them.
While you talk over with your checkout web page, you will have to not see the disabled price strategies:

How one can Disable PayPal’s Choice Fee Strategies
When you have more than one price strategies enabled by the use of PayPal, then you’ll be able to simply prohibit them, too. As an example, what you are promoting may now not be capable of settle for Venmo bills, so you could wish to flip off this feature.

First, you’ll be able to use the similar way we mentioned above.
Move to WooCommerce » Settings » Bills. Then, you’ll be able to click on the toggle transfer for any price way classified ‘(by the use of PayPal).’

Then again, you’ll be able to click on the ‘Set up’ button subsequent to the PayPal possibility.
This may take you to the PayPal settings web page.

At the PayPal settings web page, scroll down till you to find the ‘Choice Fee Strategies’ segment.
Within the ‘Disable Choice Fee Strategies’ box, sort within the particular WordPress price strategies you need to cover out of your checkout web page.

While you’ve made your possible choices, scroll down and click on ‘Save Adjustments.’
Now, your preferred price strategies can be disabled.

At this level, you’ll be able to cross on your checkout web page to peer in case your selection price strategies have disappeared.
Right here’s what occurs if we disable the credit score or debit playing cards possibility as a PayPal selection price way:

👋 Word: PayPal robotically displays location-specific selection price easy methods to your shoppers. As an example, shoppers within the Netherlands will see iDEAL as a price possibility, whilst shoppers in different areas will handiest see price strategies related to their location.
How one can Disable Fee Strategies Enabled by means of Stripe
When the use of Stripe as your price gateway in WooCommerce, it robotically permits more than one price choices. Those come with bank cards, debit playing cards, or even some native price choices in line with your area, like Alipay and WeChat.

To strengthen the buyer revel in, you may wish to prohibit price easy methods to handiest the ones your shoppers if truth be told use.
This fashion, folks don’t get perplexed or unintentionally run into problems after opting for a technique that gained’t paintings for them.
To try this, cross to WooCommerce » Settings » Bills. Then, click on the ‘Set up’ button subsequent to the Stripe possibility.

At the subsequent web page, scroll right down to the ‘Bills permitted on checkout’ segment.
Right here, you’ll be able to disable price strategies by means of unchecking those you don’t wish to be offering.

Stripe gives a lot of price gateways in WooCommerce, together with Apple Pay, Google Pay, Alipay, Klarna, Confirm, and AfterPay.
Make sure you handiest allow the precise price choices that make sense for what you are promoting and your shoppers.
While you’ve decided on your most popular price strategies, scroll down and click on ‘Save Adjustments.’

👋 Word: Stripe shows price strategies in line with your retailer’s foreign money settings. As an example, SEPA Direct Debit will handiest seem as a price possibility when your retailer is about to make use of EUR (Euro) as its foreign money.
Right here’s what our checkout web page looks as if after ACH Direct Debit and Alipay are disabled:

Choice 2: Set Up Conditional Fee Gateways With a Unfastened Plugin (Simple + Customizable)
Have you ever ever sought after to turn other price choices to other shoppers? That’s precisely what conditional price gateways do – they display or conceal price strategies in line with particular “if/then” laws.
As an example, you may wish to:
- Disable coins on transport for global shoppers (as a result of this isn’t operationally conceivable).
- Disable financial institution transfers for virtual merchandise (since this stuff are delivered in an instant, it will lend a hand save you fraud).
- Disable positive price choices for better orders (to cut back transaction charges).
That is easiest for companies like global shops that want other price strategies by means of nation, luxurious manufacturers that need protected price choices for high-value purchases, and wholesale retail outlets that supply particular price phrases for bulk patrons.
The loose Disable Fee Manner for WooCommerce plugin makes putting in place conditional price choices simple and loose. You’ll be able to create laws in line with transport zones, cart totals, consumer roles, time of day, and extra, with out touching any code.
First, you wish to have to put in and turn on the plugin. In the event you’re new to this procedure, take a look at our step by step information on tips on how to set up a WordPress plugin for freshmen.
After you turn on the plugin, cross to ‘Fee Manner’ on your WordPress admin house. Then, click on the ‘+ Upload disable price way rule’ button to start out customizing your WooCommerce price strategies.

Now, let’s discover the fundamental settings. On the best, you’ll to find the ‘Standing’ transfer. This turns on or deactivates every rule to disable price strategies.
Below ‘Rule sort,’ you’ll be able to choose from two choices: disable particular price strategies or fee further charges for price processing. For this educational, we’ll select the primary possibility.
That being stated, the second one possibility is superb if you wish to go processing charges for positive price strategies – as an example, including a small charge for bank card bills.
If you wish to be informed extra about this, take a look at our information on tips on how to go price processing charges to shoppers in WordPress.

Subsequent, let’s give the rule of thumb a descriptive identify. The use of transparent, descriptive names on your price laws makes it more straightforward to control more than one conditional price settings later.
As an example, if you happen to’re disabling Purchase Now Pay Later choices, you may identify it ‘Disable BNPL strategies.’
Now, within the ‘Disable this price strategies*’ field, make a selection which choices you’d love to disable.

Within the field underneath that, you’ll be able to additionally optionally disable price strategies for particular currencies, which is superb if you happen to run a multi-currency WooCommerce retailer. This feature is especially helpful for global retail outlets the place positive price gateways handiest paintings with particular currencies.
In our instance, we’ll disable price gateways like Klarna, Confirm, and Afterpay, as those are all Purchase Now Pay Later services and products.
Shifting down, you’ll to find the segment for putting in place conditional price laws. In ‘Underneath stipulations decide when to disable price strategies,’ you’ve two choices.
‘The entire underneath laws will have to fit’ implies that each and every situation you place will have to be true for the price approach to be disabled. As an example, if you happen to set stipulations for each cart overall and consumer function, then shoppers will have to meet each stipulations prior to the price way disappears.
‘Any one of the vital underneath rule will have to fit’ method the price way can be disabled when only one situation is met. So, if you happen to set laws for both cart overall or consumer function, assembly simply this kind of stipulations will conceal the price possibility.
For this situation, we will be able to use the primary possibility.

Now, click on at the ‘Make a choice situation’ dropdown menu. Right here, you’ll to find a number of classes to create conditional price laws, together with location, product, transport way, cart overall, date and time, and consumer function.
For instance, let’s arrange a price gateway for particular cart values. We’ll select ‘Cart Subtotal (Sooner than Cut price)’ from the ‘Cart Similar’ class to disable price strategies like Purchase Now Pay Later choices when orders exceed a specific amount.
This is helping scale back faux orders and fraud for higher-value purchases on your WooCommerce retailer.

Subsequent, you’ll be able to select whether or not to disable price strategies when the situation is:
- Equivalent to (=)
- Much less or Equivalent to (<=)
- Not up to (<)
- Larger or equivalent to (>=)
- More than (>)
- Now not equivalent to (!=)
In our instance, we’ll use ‘Larger or equivalent to’ since we wish to disable positive price gateways in WooCommerce when orders succeed in or exceed our threshold quantity.

After all, input your goal cost within the remaining box.
In our case, we’ll sort in ‘250.’ Because of this when a visitor’s cart reaches $250 or extra, WooCommerce will disable the Purchase Now Pay Later price strategies we decided on previous.

Something we like about this plugin is that you’ll be able to create advanced conditional price laws by means of combining more than one stipulations.
As an example, you need to prohibit price choices in line with cart totals and particular dates. This could paintings completely for managing price strategies all over vacation gross sales classes.
So as to add any other situation on your WooCommerce price laws, merely click on the fairway ‘Upload Situation’ button. After that, apply the similar steps.
Every new situation is helping you fine-tune precisely when and the way price strategies seem in your checkout web page.

While you’re satisfied along with your conditional price laws, click on ‘Save Rule.’
The price strategies you’ve decided on will robotically be hidden on your WooCommerce checkout when shoppers meet your specified stipulations.

Now, let’s have a look at a couple of examples of tips on how to arrange price gateway laws for different industry wishes:
How one can Disable Money on Supply for Global Shoppers
Do you promote merchandise across the world and be offering coins on transport?
If that is so, you will have to disable this price way for global shoppers. This may steer clear of price assortment problems and scale back transport dangers.
To try this, you’ll be able to create a brand new rule and identify it one thing like ‘Disable COD for Non-[Country Name] Shoppers.’ Then, make a selection ‘Money on transport’ within the price strategies segment.

For the situation, select ‘Nation’ from the site choices and make a selection ‘Now not Equivalent to (!=).’
After that, input your retailer’s nation.

Now, the cash-on-delivery price way will handiest seem for native shoppers. On the similar time, it’ll be robotically hidden for any individual ordering from different international locations.
Right here’s how our checkout web page seems when considered as a visitor from Japan:

How one can Disable Financial institution Transfers for Virtual Merchandise
Virtual merchandise want particular care as a result of they’re delivered straight away, and financial institution transfers may also be dangerous because of gradual processing instances. Because of this, we suggest disabling this price possibility on your virtual items.
First, make certain your whole virtual merchandise are in the similar class (like ‘Virtual merchandise’). In the event you haven’t looked after your merchandise but, take a look at our information on tips on how to upload product tags, attributes, and classes in WooCommerce.
Then, create a brand new rule and identify it ‘Disable Financial institution Switch for Virtual Merchandise.’ Pick out ‘Direct financial institution switch’ because the price way you need to disable.

For the situation, you’ll be able to select ‘Cart has made from class’ from the product choices.
Then, make a selection your virtual merchandise class.

And also you’re accomplished!
Now, when any individual buys an merchandise from the virtual product class, they gained’t see the financial institution switch possibility at checkout.

How one can Disable Particular Fee Strategies for Huge Orders
When you have ever processed huge orders on your WooCommerce retailer, then you already know that percentage-based price gateway charges can take an enormous bite from your earnings.
As an example, PayPal fees 2.99% + a set charge. On a $1,000 order, that’s round $30 in charges!
So, right here’s tips on how to arrange conditional price gateways to supply less expensive price choices for high-value purchases.
For this situation, we’ll center of attention on PayPal since its percentage-based charges can turn into in particular dear for small industry house owners dealing with huge transactions.
First, create a brand new rule and identify it ‘Disable PayPal for Top-Worth Orders.’ Make a choice ‘PayPal’ out of your WooCommerce price strategies.

In ‘Underneath stipulations decide when to disable price strategies,’ select ‘Any one of the vital underneath rule will have to fit.’
For the primary situation, you wish to have to pick out ‘Cart Subtotal (Sooner than bargain),’ make a selection ‘Larger or equivalent to,’ and input ‘1000’ (regulate this quantity in line with your price gateway charges).
For the second one situation, select ‘Cart amount,’ make a selection ‘More than or equivalent to,’ and input ’10’ (or no matter quantity is sensible for what you are promoting).

Now, when a visitor’s order meets both situation – spending $1000 or extra, OR ordering 10 or extra pieces – PayPal gained’t seem as a price possibility at checkout.
You’ll be able to position a take a look at order and cross on your checkout web page to peer if the foundations paintings:

📌 Searching for simpler techniques to maximise earnings? Learn to lower your expenses with our information on tips on how to scale back your Stripe processing charges in WordPress.
Choice 3: Use Wholesale Suite to Limit Fee Strategies (For Wholesale Shoppers)
In the event you be offering wholesale pricing, then you definitely’ll most likely wish to set other price gateways in line with consumer function. Chances are you’ll wish to be offering common shoppers all of the usual price strategies however prohibit them for wholesale shoppers.
This fashion, you’ll be able to maximize your earnings and reduce any price safety dangers.
As an example, wholesale shoppers ceaselessly make very huge purchases, and likely price choices (like PayPal) have increased charges. To steer clear of those steep charges chopping into earnings, you need to disable PayPal for wholesale customers.
In a similar fashion, you may flip off Purchase Now Pay Later choices so that you don’t must look forward to a longer length for enormous sums of cash (or chance by no means receiving them).
Whilst you’ll be able to arrange conditional price gateways the use of the plugin from Choice 2, wholesale plugins usually already come with this selection.
The Wholesale Suite plugin package deal, as an example, has integrated plugins to control price strategies in line with wholesale consumer roles. It will strengthen the buyer revel in on your B2B patrons.
To get began, cross forward and set up those WordPress plugins from the Wholesale Suite on your on-line retailer:
Whilst the Professional model comes with a ticket, it unlocks crucial wholesale options, together with price way keep watch over and tiered pricing.
You’ll be able to learn our detailed Wholesale Suite evaluate for more info.
As soon as each plugins are energetic, be sure you have your wholesale retailer fundamentals in position. Listed here are some useful tutorials you’ll be able to apply:
- How one can Upload Wholesale Pricing in WooCommerce (Step by means of Step)
- How one can Create a Wholesale Order Shape in WordPress
- How one can Conceal Costs in WooCommerce (Stay Product Pricing Personal)
To limit particular price easy methods to wholesale shoppers, you’ll be able to cross to Wholesale » Settings. Then, make a selection ‘Fee Gateway.’

Subsequent to ‘Wholesale Position,’ make a selection the ‘Wholesale Buyer’ function that the plugin has arrange. Then, sort within the price gateways you need to allow.
As soon as accomplished, simply click on ‘Upload Mapping.’

You will have to now see all the enabled price gateways within the desk underneath.
Like so:

Now, if the consumer logs in as a Wholesale Buyer, they are going to handiest see this particular price way on their checkout web page.
Right here’s an instance:

Choice 4: Use Complex Coupons to Limit Fee Strategies (For Particular Coupons)
Need to be offering rewards for the use of positive price strategies?
You’ll be able to do that by means of growing coupons tied to precise price choices, which inspires shoppers to make use of the ones most popular price strategies.
Whilst the plugin from Choice 2 on this information can take care of this process, coupon plugins like Complex Coupons come with this selection by means of default. We adore this plugin as it means that you can create detailed laws and customizations on your payment-specific reductions.
First, you wish to have to set up those WordPress plugins on your WordPress admin house:
The top rate model is paid, however you’ll want it to limit price strategies and create complex coupon laws. For more info, take a look at our whole Complex Coupons evaluate.
Subsequent, arrange your coupons by means of going to Coupons » Upload New.

Then, you’ll be able to configure your coupon settings then again you prefer. For detailed directions, learn our step by step information on tips on how to create good coupons in WooCommerce.
For this educational, we’ll center of attention on growing payment-specific reductions. We’ll create a chit code referred to as PAYPAL20 that provides shoppers a 20% bargain once they select PayPal as their price way.

To limit the price way for the coupon, scroll down and to find the ‘Fee Strategies Restriction’ tab. Test the field that claims ‘When checked, will allow price strategies restriction take a look at when coupon is implemented.’
For the ‘Sort,’ you’ve to choose ‘Allowed.’

Then, in ‘Fee Strategies,’ input PayPal.
After that, be at liberty to proceed putting in place your coupon. As an example, you’ll be able to create an auto-apply coupon URL and percentage it along with your attainable shoppers.

While you’re completed configuring those settings, click on ‘Replace’ or ‘Put up’ to save lots of your coupon.
It’s so simple as that!

When shoppers use this coupon, they’ll see PayPal as the one price way.
The cut price can also be implemented to their order abstract.

Choice 5: Upload Customized Code to Disable Fee Strategies (Complex + No Plugin)
In the event you don’t wish to use a devoted price plugin, then you’ll be able to additionally get the similar effects with a number of traces of customized code. We’ll display you tips on how to disable price strategies in line with two not unusual situations: visitor location (nation) and cart overall.
Remember the fact that this means is extra technical than the former choices. It calls for including code on your purposes.php document, which controls how your WordPress website online behaves.
On the other hand, we don’t counsel modifying your purposes.php document without delay, as making even a small mistake can damage all of your website online. As an alternative, we propose the use of WPCode, which is a code snippet supervisor that is helping you upload customized code safely.
Whilst this is a plugin, it’s a light-weight instrument for plenty of customizations past price strategies, similar to including monitoring codes, customized purposes, or analytics.
You’ll be able to learn our whole WPCode evaluate and our information at the most dear WordPress code snippets for freshmen to peer what you’ll be able to do with WPCode.
Sooner than we commence, we wish to know the ID of the price gateway that we wish to disable. To try this, simply cross to WooCommerce » Settings and turn to the ‘Bills’ tab.

Then, hover your cursor over one of the vital price strategies.
As you do that, be aware of the URL preview that looks on the backside of your browser. It will have to glance one thing like this: https://instance.com/wp-admin/admin.php?web page=wc-settings&tab=checkout&segment=payment-gateway-id
The section on the finish that follows &segment=
is your price gateway ID. So, as an example, if you happen to hover over the PayPal possibility, then the ID is ppcp-gateway
.

Make sure you remember of this knowledge, as you’ll want it within the subsequent steps.
Now, set up WPCode in your WordPress website. You’ll be able to learn our step by step information on tips on how to set up a WordPress plugin for detailed directions.
Subsequent, cross to Code Snippets » + Upload Snippet. Then, select ‘Upload Your Customized Code (New Snippet)’ and click on at the ‘+ Upload Customized Snippet’ button.

After that, you’ll want to make a choice a code sort.
For this educational, make a selection ‘PHP Snippet.’

Now, let’s have a look at two code snippets you’ll be able to upload to disable particular price strategies in WooCommerce.
How one can Disable Fee Strategies According to Nation
To try this, you wish to have to provide your code snippet a reputation like ‘Disable [Payment Method Name] for [Country Name].’
After that, you’ll be able to paste the code snippet underneath into the ‘Code Preview’ field:
// Hook our customized serve as into the WooCommerce to be had price gateways filter out.
add_filter( 'woocommerce_available_payment_gateways', 'customize_payment_gateway_based_on_country', 9999 );
serve as customize_payment_gateway_based_on_country( $available_gateways ) {
// Test if we are within the admin house or if the WooCommerce visitor object isn't to be had.
// If both is right, go back the unmodified gateways.
if ( is_admin() || ! WC()->visitor ) {
go back $available_gateways;
}
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Fee Gateway ID
//
// Exchange 'your_gateway_id' with the ID of the price gateway you need to focus on.
// As an example:
// - To focus on Stripe, substitute with 'stripe'
// - To focus on PayPal, substitute with 'paypal'
//
$gateway_id_placeholder = 'your_gateway_id';
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Nation Code
//
// Exchange 'XX' with the required nation code the place you need to disable the gateway.
// Nation codes are in line with ISO 3166-1 alpha-2.
// As an example:
// - To focus on america, use 'US'
// - To focus on the UK, use 'GB'
//
$target_country_code = 'XX';
// -----------------------------------------------------------------------
// Test if the required price gateway exists inside the to be had gateways.
if ( isset( $available_gateways[ $gateway_id_placeholder ] ) ) {
// Retrieve the billing nation of the present visitor.
$customer_country = WC()->customer->get_billing_country();
// Evaluate the buyer's billing nation with the objective nation code.
if ( $customer_country === $target_country_code ) {
// If the buyer's nation suits the objective, take away the price gateway.
unset( $available_gateways[ $gateway_id_placeholder ] );
}
}
// Go back the (most likely changed) listing of to be had gateways.
go back $available_gateways;
}
Now, you’ll wish to customise two portions of this code.
First, to find the $gateway_id_placeholder
variable and substitute ‘your_gateway_id’ with the ID of your price gateway.
To find the $target_country_code
variable and substitute ‘XX’ along with your goal nation’s two-letter code. As an example:
- US – United States
- GB – United Kingdom
- CA – Canada
- AU – Australia
So, let’s say you need to disable direct financial institution transfers for patrons in america. If that is so, then your code will have to appear to be this:
// Hook our customized serve as into the WooCommerce to be had price gateways filter out.
add_filter( 'woocommerce_available_payment_gateways', 'customize_payment_gateway_based_on_country', 9999 );
serve as customize_payment_gateway_based_on_country( $available_gateways ) {
// Test if we are within the admin house or if the WooCommerce visitor object isn't to be had.
// If both is right, go back the unmodified gateways.
if ( is_admin() || ! WC()->visitor ) {
go back $available_gateways;
}
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Fee Gateway ID
//
// Exchange 'your_gateway_id' with the ID of the price gateway you need to focus on.
// As an example:
// - To focus on Stripe, substitute with 'stripe'
// - To focus on PayPal, substitute with 'ppcp-gateway'
//
$gateway_id_placeholder = 'bacs';
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Nation Code
//
// Exchange 'XX' with the required nation code the place you need to disable the gateway.
// Nation codes are in line with ISO 3166-1 alpha-2.
// As an example:
// - To focus on america, use 'US'
// - To focus on the UK, use 'GB'
//
$target_country_code = 'US';
// -----------------------------------------------------------------------
// Test if the required price gateway exists inside the to be had gateways.
if ( isset( $available_gateways[ $gateway_id_placeholder ] ) ) {
// Retrieve the billing nation of the present visitor.
$customer_country = WC()->customer->get_billing_country();
// Evaluate the buyer's billing nation with the objective nation code.
if ( $customer_country === $target_country_code ) {
// If the buyer's nation suits the objective, take away the price gateway.
unset( $available_gateways[ $gateway_id_placeholder ] );
}
}
// Go back the (most likely changed) listing of to be had gateways.
go back $available_gateways;
}
This code will conceal the direct financial institution switch possibility when shoppers from america talk over with your checkout web page.
While you’ve custom designed those portions, transfer the toggle from ‘Inactive’ to ‘Energetic,’ then click on ‘Save Snippet.’

Now, you’ll be able to cross forward and position a take a look at order to peer if the code works.
Right here’s what our checkout web page looks as if once we use the pattern code snippet for disabling PayPal for US-based shoppers:

How one can Disable Fee Strategies According to Cart Overall
First, create a brand new code snippet and provides it a descriptive identify, like ‘Disable [Payment Method] for Top-Worth Orders.’
After that, paste the next code snippet into the ‘Code Preview’ field:
// Hook our customized serve as into the WooCommerce to be had price gateways filter out.
add_filter( 'woocommerce_available_payment_gateways', 'disable_payment_gateway_for_high_cart_subtotal' );
serve as disable_payment_gateway_for_high_cart_subtotal( $available_gateways ) {
// Test if we are within the admin house. If that is so, go back the unmodified gateways to steer clear of problems within the backend.
if ( is_admin() ) {
go back $available_gateways;
}
// Get the cart subtotal.
$cart_total = WC()->cart->get_subtotal();
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Minimal Cart Subtotal
// Exchange 123 with the required minimal cart subtotal above which you need to disable the gateway.
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Fee Gateway ID
// Exchange 'your_gateway_id' with the ID of the price gateway you need to focus on.
// As an example:
// - To focus on Stripe, substitute with 'stripe'
// - To focus on PayPal, substitute with 'ppcp-gateway'
// -----------------------------------------------------------------------
// Test if the cart overall meets the minimal and if the required price gateway is to be had.
if ( $cart_total >= 123 && isset( $available_gateways['your_gateway_id'] ) ) {
// Take away the price gateway.
unset( $available_gateways['your_gateway_id'] );
}
// Go back the (most likely changed) listing of to be had gateways.
go back $available_gateways;
}
You’ll wish to customise two portions of this code. First, to find the cart subtotal cost on this line:if ( $cart_total >= 123 && isset( $available_gateways['your_gateway_id'] ) ) {
Merely substitute ‘123’ along with your desired minimal quantity (don’t come with foreign money symbols).
Subsequent, to find ‘your_gateway_id’ and substitute it along with your price gateway ID like prior to.
So, if you wish to disable PayPal for orders over $100, you possibly can set the worth to ‘100’ and use ‘ppcp-gateway’ because the gateway ID.
Right here’s what the entire code snippet would appear to be:
// Hook our customized serve as into the WooCommerce to be had price gateways filter out.
add_filter( 'woocommerce_available_payment_gateways', 'disable_payment_gateway_for_high_cart_subtotal' );
serve as disable_payment_gateway_for_high_cart_subtotal( $available_gateways ) {
// Test if we are within the admin house. If that is so, go back the unmodified gateways to steer clear of problems within the backend.
if ( is_admin() ) {
go back $available_gateways;
}
// Get the cart subtotal.
$cart_total = WC()->cart->get_subtotal();
// -----------------------------------------------------------------------
// CUSTOMIZATION 1: Minimal Cart Subtotal
// Exchange 123 with the required minimal cart subtotal above which you need to disable the gateway.
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// CUSTOMIZATION 2: Fee Gateway ID
// Exchange 'your_gateway_id' with the ID of the price gateway you need to focus on.
// As an example:
// - To focus on Stripe, substitute with 'stripe'
// - To focus on PayPal, substitute with 'ppcp-gateway'
// -----------------------------------------------------------------------
// Test if the cart overall meets the minimal and if the required price gateway is to be had.
if ( $cart_total >= 100 && isset( $available_gateways['ppcp-gateway'] ) ) {
// Take away the price gateway.
unset( $available_gateways['ppcp-gateway'] );
}
// Go back the (most likely changed) listing of to be had gateways.
go back $available_gateways;
}
While you’ve custom designed those portions, transfer the toggle from ‘Inactive’ to ‘Energetic.’
Then, click on ‘Save Snippet.’

After all, take a look at making a take a look at order to peer if the code works.
Right here’s what you will have to see in your checkout web page if you happen to disable PayPal for orders above $100:

Extra Tactics to Beef up Your WooCommerce Retailer
Now that you understand how to control price strategies in WooCommerce, listed below are different issues you’ll be able to do to construct a greater on-line retailer:
- Be offering transport time slots – Let shoppers select their most popular transport instances.
- Create product bundles – Team similar pieces in combination to spice up your reasonable order cost.
- Use good product seek – Upload robust seek options to lend a hand shoppers to find merchandise temporarily.
- Edit your cart web page – Customise your cart to cut back abandonment and build up gross sales with out code.
- Arrange conversion monitoring – Arrange analytics to grasp and strengthen your retailer’s efficiency.
- Clear out WooCommerce merchandise – Upload good filters to lend a hand shoppers to find precisely what they would like.
- Redirect to the checkout web page – Skip the cart web page to streamline the WooCommerce checkout procedure for patrons.
🚨 Able to take your on-line retailer to the following degree? Let our WPBeginner Professional Services and products group let you construct a qualified WooCommerce retailer. We’ll arrange your price gateways, optimize your checkout procedure, and make sure your retailer runs easily. Plus, you’ll get a devoted venture supervisor to supervise each and every element of your retailer setup.
We are hoping this newsletter has helped you discover ways to disable price strategies in WooCommerce. You may additionally need to try our information on tips on how to upload a loose transport bar in WooCommerce and our skilled choices of the very best Authorize.web plugins for WordPress.
In the event you preferred this newsletter, then please subscribe to our YouTube Channel for WordPress video tutorials. You’ll be able to additionally to find us on Twitter and Fb.
The submit How one can Disable Fee Strategies in WooCommerce (Final Information) first seemed on WPBeginner.
WordPress Maintenance