WooCommerce Minimum order amount refers to the minimum amount that a customer must spend when placing an order at an online store. Retail stores or service providers usually set it this way to ensure that the transaction is economically viable for the business and covers costs such as shipping, handling or payment processing fees.
![Image [1] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219161033646-image.png)
How to Set Minimum Order Amount in WooCommerce
Setting a minimum order amount in WooCommerce can be done with the PHP Code maybe plug-in (software component), the exact choice depends on your own needs.
Setting WooCommerce Minimum Order Amount with PHP Code
Setting the WooCommerce minimum order value via PHP code can beCustomized control of checkout requirements. In the theme of functions.php
Adding a few lines of code to the file will ensure that the order meets your own needs.
Always be careful before adding custom PHP code to your WordPress website:
- Backup SitesUse UpdraftPlus or the tools provided by the host for the websiteFull Backup(including files and databases) to ensure that you can recover quickly if something goes wrong with your code. See alsoHow to backup WordPress website data?
- Using subtopics: Do not modify the theme files directly, it is recommended to usesubtheme, preventing custom code from being overwritten when the theme is updated. You can learn aboutHow to Create a WordPress Child Theme (Beginner's Guide)
- Consultation with professionals: If you don't have programming experience, it is recommended to consult the developer or use theplug-in (software component), rather than inserting the code on its own.
How to add code
In the WordPress dashboard, go to Appearance > Theme Editorand then in theList of files on the righthit the nail on the head functions.php
Documentation.
![Image [2] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219154142712-image.png)
Next, copy and paste the following code snippet into the functions.php
file to apply the WooCommerce minimum order amount limit.
add_action( 'WooCommerce_check_cart_items', 'required_min_cart_subtotal_amount' );
function required_min_cart_subtotal_amount() {
// HERE Set minimum cart total amount
$minimum_amount = 200; // Total (before taxes and charges).
// Total (before taxes and shipping charges)
$cart_subtotal = WC()->cart->subtotal; // Add an error notice is cart total.
// Add an error notice is cart total is less than the minimum required
if( $cart_subtotal < $minimum_amount ) {
// Display an error message
wc_add_notice( '<strong>' . sprintf( __("A minimum total purchase amount of %s is required to checkout."), wc_price($minimum_amount) ) . '<strong>', 'error' );
}
}
point (in space or time)updatebutton to run the code:
![Image [3] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219154403300-image.png)
In this code, the minimum order amount for WooCommerce has been set to $200The
Therefore, if the order amount is less than $200The customer will not be able to proceed to checkout and will receive the following notification reminding them that the store has applied this rule.
![Image [4] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219154621511-image.png)
The customer must increase the number of items or add more items to the shopping cart, meet the minimum order amount and complete the purchase.
You can set the 200 Change the minimum order amount for WooCommerce by replacing it with any other value.
Setting WooCommerce Minimum Order Amounts with Plugins
If you find the previous method too complicated, or instead use theSimpler and safermethod, we recommend using the WooCommerce Min Max Quantity Plug-ins.
![Image [5] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219155020570-image.png)
How to Set WooCommerce Minimum Order Amount with Plugin
Step 1: Install WooCommerce Min Max Quantity Plugin
Purchase and download WooCommerce Min Max Quantity ZIP file of the plug-in.
Upload and install the plugin in the WordPress backend.
go into WordPress > iThemeland > License, enter the license key and activate the plugin.
![Image [6] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219155127292-image.png)
Once the plugin is activated, you can follow the next steps to set up the WooCommerce cart minimum order amount rule.
Step 2: Setting up WooCommerce Minimum Order Amount Rules
To create WooCommerce in a plugin Minimum Order Amount rules, follow the steps below:
In the WordPress dashboard, go to iThemeland > Min Max Quantity, open the main screen of the plug-in.
![Image [7] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219155429465-image.png)
exist General tab, find the Shopping Cart Restrictions (Cart Restrictions) section, which contains the following two options:
- Enable cart quantity restriction
- Enable cart spend restriction
![Image [8] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219155449603-image.png)
Setting Minimum Order Amount Rules
activate "Enable Shopping Cart Spending Limit" Options.
exist Minimum spend restriction (Minimum spend restriction) Enter the minimum order amount in the field.
Select the following optional items as needed (optional):
- Includes shipping and related costs: If this option is enabled, the total amount in the customer's cart (including shipping and other charges) must exceed the set minimum amount.
- Prohibition of Coupon Calculation: If this option is enabled, the coupon discount amount will not count toward the minimum spend limit.
strike (on the keyboard) Save settings, application rules.
![Image [9] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219155547263-image.png)
Step 3: Setting Minimum Order Amount Notification
After setting the minimum order amount in WooCommerce, it is necessary toSetting up notifications, making it easy for customers to understand the store's spending limit rules.
Setting method
1. Opening Notification tab, find the Cart Page Error Messages Part.
2. In Minimum Cart quantity not reached field to see the default prompt message.
- If the default notification meets the requirements, no changes are needed and the plugin will automatically display an alert to the customer when the cart amount is insufficient.
3. If requiredCustomized notificationsIn the text box, you can typeCustomized MessagesThe
![Image [10] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219160004342-image.png)
Available placeholders (optional):
- {Limit}: Display a minimum spending amount or quantity limit in the message.
- {Cart_quantity}: Displays the total number of items in the current cart in a message.
- {Cart_quote}: Can be used to customize the display of information about the shopping cart.
In this way, you can flexibly set the WooCommerce shopping cart'sMinimum Order Amount ReminderThe
Example 1: Setting the Minimum Order Amount in WooCommerce to $100
If you want the customer's order amountMust exceed $100, you can follow the steps below:
- tick Enable cart spend restrictionsThe
- exist Minimum spend restriction (Minimum spend restriction) in the text box of the 100The
- strike (on the keyboard) Save Settings Button.
![Image [11] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219160227683-image.png)
When the total amount of the customer's orderLess than $100 When they do, they will receive a notification on the WooCommerce cart page reminding them that they need to meet the minimum order amount requirement.
![Image [12] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219160241998-image.png)
Other Features of WooCommerce Min Max Quantity Plugin
Setting up WooCommerce Minimum Order Amount merely WooCommerce Min Max Quantity One of the many features of the plugin. This plugin provides flexible options for theProduct Quantity, Order Quantity and Other RestrictionsMake customized settings.
Let's take a look at some of these features.
Setting Shopping Cart Quantity Limits in WooCommerce
Many store administrators need toTo the number of shopping cartsTo carry out the restriction, it is important for theControl of minimum or maximum purchase quantitiesVery useful. For example, it is possible toLimit the number of items that customers can add to their shopping cart., make sure that the order is in line with your own store's sales strategy.
WooCommerce Min Max Quantity The plugin is a powerful tool that canQuick and easyGround set up rules for limiting the number of items in the shopping cart.
Example:
- If one wishes toMaximum 20 items per customerIt's okay.Set the maximum quantity limit to 20, so that the customer cannot exceed that amount at checkout.
![Image [13] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219160518361-image.png)
If requiredMore detailed operating instructionsYou can refer to this tutorial to learn how to create an application in WooCommerce.Setting Order Quantity LimitsThe
Adding Restriction Rules to WooCommerce Product Categories/Tabs
If your e-commerce site has multiple product categories.Applying restrictions to specific categories or labelsis a very common need.
WooCommerce Min Max Quantity The plugin supports the use of the WooCommerce Product Categories or Tags uplinkquantitiesrespond in singingConsumption amountLimitations.
![Image [14] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219160656184-image.png)
Setting up consumption restriction rules for product categories/labels
- tick Enable category spend restrictionsThe
- exist Minimum spend restriction (Minimum spend restriction) respond in singing Maximum spend restriction (MFR) Enter the appropriate amount in the field.
- strike (on the keyboard) Save OptionsThe rules will be applied to all selected product categories and labels.
![Image [15] - How to Set Minimum Order Amount in WooCommerce (Code & Plugin Guide)](https://www.361sale.com/wp-content/uploads/2025/02/20250219160707437-image.png)
reach a verdict
Setting up WooCommerce Minimum Order Amount is anImprove profitability and optimize operationsfurthermoreImproving the user experienceThe strategy. When setting a minimum spending amount, you need toBalancing customer expectations, to avoid the loss of potential customers due to excessively high thresholds.
WooCommerce Min Max Quantity Plugin furnishFlexible Rule Setting, supports minimum order amount configuration for different scenarios.
Link to this article:https://www.361sale.com/en/33637
The article is copyrighted and must be reproduced with attribution.
No comments