Order Restrictions for WooCommerce allows you to place restrictions on order total, product quantity and payment gateways during purchase.
Installation
↑ Back to top1. Download the order-restrictions-for-woocommerce.zip file from your WooCommerce account.
2. Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
3. Install Now and Activate the extension.
More information at: Install and Activate Plugins/Extensions.
Setup and Configuration
↑ Back to topOrder Total Restriction – Configuration
↑ Back to top- To enable Order Total restriction go to Order Restriction > Order Total and enable Enable Order Total Restriction.
- You can customize the error messages in the messages section.
- To create a new rule click the “Add New Rule” button and fill in the title of the rule.
- In the “Minimum Order Total” option, you can input the minimum order amount which the user has to spend on your site.
- In the “Maximum Order Total” option, you can input the maximum order amount which the user can spend on your site.
Note
Either the Minimum Order Amount or the Maximum Order Amount has to be configured in order for the Order Total Restriction to be functional.
- By default, the Order Total restriction applies to all the products on the site. If you want to restrict it to specific products/categories, you can do so by customizing the “Product Filter” option in the Criteria section.
- In the “Minimum Number of Product(s) in the Cart” option, you can set the minimum number of products which has to be purchased by your users in order to place an order on your site.
- In the “Maximum Number of Product(s) in the Cart” option, you can set the maximum number of products that can be purchased by your users on your site.
- By default, the Order Total restriction applies to all the users on the site. If you want to restrict it to specific Users/Userroles, you can do so by customizing the “User Filter” option in the Filter section.
- By default, the Order Total restrictions will apply indefinitely. If you want to apply the order restriction to a specific time period, you can do so by setting a date in the From and To options in the Filter settings.
- The Order Total Restriction can also be restricted to specific days of the week.
Min/Max Quantity Restriction – Configuration
↑ Back to topGlobal Settings
- To enable Min/Max Quantity restriction go to Order Restrictions > Min/Max Quantity and enable Enable Min/Max Quantity Restriction option.
- In the “Minimum Quantity for Product Purchase”, input the minimum quantity which your user has to purchase for each product.
- In the “Maximum Quantity for Product Purchase”, input the maximum quantity which your user can purchase for each product.
Note
Either the minimum quantity or the maximum quantity has to be configured in order for the Min/Max Quantity Restriction to be functional.
- In the “Step Value for Quantity Increment” option, you can configure the minimum quantity which your users can increment on your site.
For Example: If the value is set 2, then the user can increase the quantity in increments of 2.
- By default, the min/max quantity restrictions will apply indefinitely. If you want to apply the order restriction to a specific time period, you can do so by changing the Validity Type option to “Date Range” and setting the Date in the “Limited Validity Duration Option”.
- By default, the min/max quantity restriction applies to all the users in the site. If you want to restrict it to specific Users/Userroles, you can do so by customizing the “User Filter” option in the Filter section.
- If you want to hide the product stock info on the single product pages and other archive pages, set the Stock Info Visibility option to Hide.
Product Level Settings
- If you want to override the Min/Max Quantity Restriction for a particular product, edit that product and enable the “Override Global Settings”.
- In the “Minimum Quantity for Product Purchase”, input the minimum quantity which your user has to purchase for each product.
- In the “Maximum Quantity for Product Purchase”, input the maximum quantity which your user can purchase for each product.
Note
Either the minimum quantity or the maximum quantity has to be configured in order for the Min/Max Quantity Restriction to be functional.
- In the “Step Value for Quantity Increment” option, you can configure the minimum quantity which your users can increment on your site.
For Example: If the value is set 2, then the user can increase the quantity in increments of 2.
- By default, the min/max quantity restrictions will apply indefinitely. If you want to apply the order restriction to a specific time period, you can do so by changing the Validity Type option to “Date Range” and setting the Date in the “Limited Validity Duration Option”.
- By default, the min/max quantity restriction applies to all the users on the site. If you want to restrict it to specific Users/Userroles, you can do so by customizing the “User Filter” option in the Filter section.
- If you want to hide the product stock info on the single product pages and other archive pages, set the Stock Info Visibility option to Hide.
Payment Gateway Restriction – Configuration
↑ Back to top- To enable Payment Gateway restriction go to Order Restrictions > Payment Gateway and enable Enable Payment Gateway Restrictions.
- To create a new rule click the “Add New Rule” button and fill in the title of the rule.
- In the “Payment Gateway for Restriction” option, select the payment gateway for which you want to configure the restriction.
- In the “Minimum Order Total” option, you can input the minimum order amount for using the payment gateway.
- In the “Maximum Order Total” option, you can input the maximum order amount for using the payment gateway.
Note
Either the Minimum Order Amount or the Maximum Order Amount has to be configured in order for the Payment Gateway Restriction to be functional.
- By default, the payment gateway restriction applies to all the products on the site. If you want to restrict it to specific products/categories, you can do so by customizing the “Product Filter” option in the Criteria section.
- In the “Minimum Number of Product(s) in the Cart” option, you can set the minimum number of products which has to be purchased by your users in order to use the payment gateway.
- In the “Maximum Number of Product(s) in the Cart” option, you can set the maximum number of products which has to be purchased by your users in order to use the payment gateway.
- By default, the payment gateway restriction applies to all the users on the site. If you want to restrict it to specific Users/Userroles, you can do so by customizing the “User Filter” option in the Filter section.
- By default, the payment gateway restrictions will apply indefinitely. If you want to apply the order restriction to a specific time period, you can do so by setting a date in the From and To options in the Filter settings.
- The payment gateway restriction can also be restricted to specific days of the week.
Usage
↑ Back to topOrder Total Restriction – Usage
↑ Back to top- User adds few products to the cart and proceeds to the cart page.
- On the cart page, an error message will be displayed to the user, if their order total is not within the configured threshold.
- The user will be allowed to place an order only when they meet the minimum requirements for Order Total.
Min/Max Quantity Restriction – Usage
↑ Back to top- When the user adds the product to the cart, the minimum product quantity configured in the plugin will be added to the cart.
- Users will not be able to purchase below/above the specified quantity.
Payment Gateway Restriction – Usage
↑ Back to top- User adds few products to the cart and proceeds to the checkout page to complete the payment.
- The restricted payment method will be visible only when the order amount is within the specified threshold.
Translation
↑ Back to topOrder Restrictions for WooCommerce is translation ready, meaning you can edit the po files by which you can translate the text to any language. Steps to perform the translation are as follows. For example, a translation to French.
- Download and install Poedit
- Open the file order-restrictions-for-woocommerce > languages > order-restrictions-for-woocommerce.pot using Poedit.
- Create a new translation file by clicking Create new translation button.
- Choose the Source text and set its corresponding French text in Translation Text Area.
- Save the changes.
- Save the file name as order-restrictions-for-woocommerce-fr_FR.po.
- Then go to WordPress dashboard > Settings > General and select the Site Language as French.