Magento 2 Shipping Restrictions


Magento 2 Shipping Restrictions extension allows restricting shipping methods based on the cart attributes, customer attributes, and days and time of the week for efficient shipping management.


Table of Content

  1. Extension Installation
  2. Configuration
  3. Add New Restriction Rule
  4. Shipping Restrictions in Frontend
  5. Shipping Restrictions on Orders from Backend


  1. Extension Installation
  • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
  • Login to your SSH and run below commands step by step:
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush
  • That’s it.


  1. Configuration
    For configuring the extension, login to Magento 2, move to Sales > Shipping Restrictions from where you can add new Shipping Restriction rules. Already created and saved restriction rules enlisted here. Click “Add Rule” button to add a new restriction rule.


  1. Add New Restriction Rule
    On click of “Add Rule”, you get moved to general settings for the new restriction rule.
  • Rule Name: Enter the restriction rule name to recognize easily.
  • Rule Status: Activate the shipping restriction rule from here.
  • Shipping Carriers and Methods: Select shipping carriers and shipping methods of the selected shipping carrier to apply the restriction rule on all or some of the methods of the shipping carrier.
  • Stores: Select stores to apply the shipping restriction rule on.
  • Customer Groups: Select customer groups to apply the shipping restriction rule on.
  • For Admin: Select YES to enable the created restriction rule for the backend orders.
  • Error Message: Enter the restriction error message for the rule to show in the frontend.


  • Restriction Conditions
    Set conditions to restrict the shipping method. You can select various cart attributes and customer attributes to defines the condition for the shipping restriction.


  • Days and Time-Based Conditions
    Set days and time for the rule to restrict the shipping methods only for the specific days of the week and time.


  1. Shipping Restrictions in Frontend
    Once all the Shipping Restriction rules are defined and saved, when customers add products to cart, the shipping method is restricted based on the set conditions. Here,

Product price: 299.00

Shipping Country: United States

Restriction Rules Applied = 2

Shipping Method Restricted = Free Shipping, Shipping Table Rates


  1. Shipping Restrictions on Orders from Backend
    If a Shipping Restriction rule is enabled for the admin panel while configuring the extension and if the restriction condition match, the shipping method is restricted even on the orders from backend.