=== Easy Shipping Rate for WooCommerce ===
Contributors: azouamauriac, freemius
Donate link: https://www.buymeacoffee.com/azouamauriac
Tags: shipping, table rate shipping, conditional shipping, free shipping, woocommerce
Requires at least: 5.9
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 5.9
WC tested up to: 10.8
Stable tag: 1.4.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Powerful conditional & table-rate shipping for WooCommerce — by cart total, weight, dimensions, products, location or role. No code needed.

== Description ==

**Easy Shipping Rate** gives WooCommerce store owners full control over shipping costs — without writing a single line of code. Build as many custom shipping methods as you need, assign them to any shipping zone, and price them with flexible conditions that match your exact business rules.

From a simple flat rate to a full table-rate matrix, everything is configured on one screen — a complete shipping toolbox in a single download.

= At a glance =

* 🚚 **Conditional & table-rate pricing** by cart total, weight, dimensions, products, location, role and more.
* 🧮 **Formulas & percentages** in the cost field — `5+[qty]*1.50` or `[subtotal]*0.08`.
* 🎁 **Free shipping** by minimum amount, coupon, postcode, or any combination.
* ⚡ **One-click starter templates** — load a ready-made rule set and tweak it, instead of starting from a blank table.
* 🔎 **Built-in debug mode** — see exactly which rule set each shipping cost, right on the cart, without guesswork.
* 🛒 **Built for the block editor** — works in the classic cart/checkout *and* the new WooCommerce Cart & Checkout blocks.
* 🌍 **Speaks your language** — the plugin ships translated, and your own method names and labels are translatable with WPML or Polylang.
* ✅ **HPOS compatible** and ready to use out of the box — install it and start shipping.

= Quick start: your first shipping rate in 2 minutes =

Never set up shipping before? Follow these steps and you are done:

1. **Activate the plugin.** Make sure WooCommerce is active first, then activate Easy Shipping Rate.
2. **Open your shipping settings.** In the WordPress admin menu, go to **WooCommerce > Settings > Shipping**.
3. **Pick where you ship.** Click a **shipping zone** (a zone is simply an area you deliver to, like your country). If you have none yet, click **Add zone** and choose your country.
4. **Add the method.** Inside the zone, click **Add shipping method**, select **Easy Shipping** from the list, and confirm.
5. **Name it and set a price.** Open the new method, type a name your customers will see (for example "Standard delivery"), and enter an amount in the cost field (for example `5`).
6. **Save.** Click **Save changes**. Your shipping rate is now live at checkout.

That is all you need for a flat rate. When you want to charge by weight, cart total, location, customer role and more, just add extra rules to the same method — every option is explained right on the screen.

Each method supports multiple stacked rules. Choose whether matching rules are **summed**, or whether only the **lowest** or **highest** cost applies — covering everything from simple flat rates to complex table-rate scenarios.

= What you can do =

* Set shipping costs based on **cart subtotal, quantity, weight, volume, dimensional weight,** or number of line items.
* Price rules with **formulas and percentages**: set the cost to `5+[qty]*1.50` or `[subtotal]*0.08` using cart tokens.
* Target customers by **location** (postcode, city, state, country) or **user role**.
* Apply rules based on the **products or shipping classes** in the cart.
* Offer **free shipping** triggered by a minimum order amount, a valid coupon, a specific postcode, or any combination.
* Nudge shoppers with a **"Spend $X more to get free shipping"** reminder — on the cart *and* the checkout, in both the classic templates and the WooCommerce blocks.
* Set a **minimum and maximum cost** per method.
* Show customers a custom **description and estimated delivery date** at checkout.
* **Translate** method titles, descriptions and free shipping labels per language with **WPML** or **Polylang**.
* Restrict a method to **logged-in users** only.
* **Pre-select** a default shipping method on the cart page.
* **Hide all other methods** automatically when free shipping is available.
* **Schedule** a method with a start and end date.
* **Import and export** shipping methods as CSV files to copy them between zones or stores.
* **Load a ready-made template** and duplicate rules to build a full rate table in minutes.
* **Debug why a rate was charged** with an admin-only report on the cart and checkout.

= Fast to set up, easy to manage =

Building shipping rules should not feel like work. Every part of the interface is designed to get you to a working rate quickly and keep it maintainable as it grows:

* **Start from a template** — a "Load a template" picker fills the table with a ready-made scenario (flat rate, free shipping above an amount, weight-based tiers, free shipping for chosen postcodes) that you can adjust before saving.
* **Duplicate any rule in one click** — copy a row to build a big table fast, without retyping every condition.
* **Tidy, collapsible sections** — each group of settings folds behind a toggle, so a long method fits on one screen and nothing gets missed.
* **Per-row controls** — duplicate or delete a rule right where it sits, with a confirmation before anything is removed.

= Know exactly why a rate was charged (debug mode) =

Turn on **debug mode** for any method and, as an administrator, you get a clear report right on the cart and checkout showing **every rule that was evaluated**, whether it matched, the cart value it was tested against, and the resulting cost — plus the final calculation. Customers never see it. It turns "why is shipping $12 here?" into a two-second answer, and you can switch it on temporarily by adding `?debug_shipping=1` to the cart URL.

= Works everywhere your store does =

* **WooCommerce Cart & Checkout blocks** — the free shipping reminder and your method details show up in the new block-based pages, not just the classic shortcodes.
* **Multilingual stores** — names and labels you type are registered for translation, so WPML and Polylang shoppers see them in their own language.
* **A translated admin** — the plugin's own screens, including every rule condition and its explanations, ship in several languages, so whoever configures shipping does not have to work in English.
* **High-Performance Order Storage (HPOS)** and **Cart/Checkout Blocks** compatibility are declared, so WooCommerce never flags the plugin.

= Why choose Easy Shipping Rate? =

Everything listed above is in the free plugin and works from the moment you activate it: formula pricing, conditional rules, location and role targeting, free shipping triggers, cost caps, scheduling, import and export, starter templates and the debug report.

Build a simple flat rate in seconds, or a full table-rate matrix with stacked conditional rules — all from one screen, with no code.

= Going further with Pro =

The free plugin covers everything above and stays that way. Pro exists for stores whose rates depend on **what is in the basket** and **when the customer orders** — the cases that need product data and timing rather than totals and destinations.

Pro adds these rule conditions:

* **Product category, tag and type** — charge differently for a category, a tag, or simple, variable, grouped and external products. Categories and tags use a live search field, so large catalogues stay fast.
* **Coupon code** — apply a rate only when a given coupon has been entered.
* **Day of the week and time of day** — restrict a rate to chosen days, or to a time window that can run past midnight, for same-day delivery cut-offs.
* **Product length, width and height** — price oversized items on their real dimensions.
* **Items on sale and stock status** — react to discounted items, or to items out of stock or on backorder.
* **Postcode ranges and wildcards** — cover a whole area with `75*` or `1000-2000` instead of listing every postcode.
* **"Contains all of" matching** — require every selected product, category or tag to be present, not just one of them.

Pro also comes with a fourteen-day free trial, no card required. In your admin, open **Easy Shipping > Upgrade to Pro** to see the full comparison and start the trial.

== Installation ==

1. Make sure WooCommerce is installed and activated.
2. Install Easy Shipping Rate from the **Plugins > Add New** screen in WordPress, or upload the plugin files to the `/wp-content/plugins/easy-shipping-rate` directory.
3. Activate the plugin through the **Plugins** screen in WordPress.
4. Go to **WooCommerce > Settings > Shipping**, open a shipping zone and add the **Easy Shipping** method.
5. Configure the method options and pricing rules, then save.

See the **Quick start** in the Description tab for a step-by-step walkthrough for first-time users.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active for Easy Shipping Rate to work.

= Where do I configure a shipping method? =

In your WordPress admin, go to WooCommerce > Settings > Shipping, choose a shipping zone, add the "Easy Shipping" method and edit it.

= Can I have several rules on the same method? =

Yes. Each method can contain as many rules as you need. You decide how the matching rules are combined: sum them, keep the lowest cost or keep the highest cost.

= Can I use a formula or a percentage as the cost? =

Yes. The Cost field accepts either a fixed amount (`12.50`) or a formula combining the `[qty]`, `[items]`, `[weight]`, `[subtotal]`, `[subtotal_ex]` and `[volume]` tokens with + - * / and parentheses. For example, `5+[qty]*1.50` charges a base fee plus a per-item surcharge, and `[subtotal]*0.08` charges 8% of the cart subtotal.

= Does it work with the new WooCommerce Cart and Checkout blocks? =

Yes. Easy Shipping Rate supports both the classic cart/checkout pages and the block-based Cart and Checkout. Your method title, description and the "Spend $X more to get free shipping" reminder all appear in the block editor pages.

= Can I translate the method names and labels? =

Yes. The method title, description and free shipping label you enter are registered for translation, so stores using WPML or Polylang can show them in each customer's language.

The plugin's own admin screens are a separate matter, and they are already translated into several languages, conditions and explanations included. Nothing to install, nothing to configure — WordPress picks the language of your site.

= Can I move my methods to another store? =

Yes. Use the Import/Export pages added by the plugin to export your methods to a CSV file and import them into another zone or store.

= How do I start quickly without building rules from scratch? =

Open a method and use the **"Load a template"** picker above the rules table. Pick a ready-made scenario — flat rate, free shipping above an amount, weight-based tiers, or free shipping for specific postcodes — and it fills the table with example rules you can adjust before saving. You can also duplicate any existing rule in one click to build a bigger table fast.

= A shipping cost looks wrong. How do I find out why? =

Switch on **Debug mode** in the method's Advanced Options. As an administrator you then see a report on the cart and checkout listing every rule that was evaluated, whether it matched, the cart value it was tested against, and the resulting cost — so you can see exactly how the final price was reached. Customers never see this report. You can also add `?debug_shipping=1` to the cart URL to switch it on temporarily.

= What is included in the free plugin? =

Everything on this page except the section titled "Going further with Pro": formula pricing, conditional rules, location and user-role targeting, free shipping triggers, the "spend more for free shipping" reminder, estimated delivery dates, cost caps, scheduling, CSV import/export, starter templates, rule duplication and the admin-only debug report. It all arrives in the single download and works straight away.

= Is there a Pro version? =

Yes. Pro adds the rule conditions that depend on the products in the basket and on the moment of the order: product category, tag and type, coupon code, day of the week, time of day, product dimensions, items on sale, stock status, postcode ranges and wildcards, and "contains all of" matching. Everything else stays free and complete.

It comes with a fourteen-day free trial without a card. Open **Easy Shipping > Upgrade to Pro** in your admin to compare both versions side by side.

= Do my rules keep working if I stop paying? =

Yes. Nothing is deleted and nothing breaks. Rules built on free conditions carry on exactly as before, and rules using a Pro condition simply stop applying until the licence is renewed, at which point they resume.

== Screenshots ==

1. Build conditional pricing rules on one screen, with no code.
2. Free shipping triggered by a minimum amount, a coupon or a postcode.
3. What the customer sees: your method, its cost and the free shipping reminder.
4. Cost caps, estimated delivery, rule calculation mode and the debug report.
5. Name, description and schedule for the method shown at checkout.
6. Adding the method to any WooCommerce shipping zone.

== Changelog ==

= 1.4.0 =
**Added**

* The rule builder now lists every condition the plugin can offer, including the paid ones. Those are disabled and marked "(Pro)", so you always know what a rule could do.
* A "Getting started" screen: the three steps to a first shipping rate and a button that goes straight to the shipping zones. It opens once, right after activation, and stays available in the Easy Shipping menu.
* The "Getting started" screen now explains the rules table in four sections that open on click: what makes a rule apply, how a cost is written, what each action does, and how the costs of several matching rules are combined. A "How rules work" link next to the rules table opens it in a new tab.
* An "Upgrade to Pro" screen in the Easy Shipping menu, comparing side by side what the free version already does and what the paid version adds. It is only there while the paid version is not active.
* A one-time welcome notice after the first activation, pointing to the shipping settings with a "Go to Shipping Zones" button. It never reappears once dismissed.
* A one-time guided tour on a new, empty method: three short tips pointing at the Condition, Cost and Action columns. It runs once and is remembered in the browser so it never replays.

**Changed**

* The settings page was tidied: a single heading instead of two, the settings grouped in one card, and the redundant Import / Export paragraph removed.

**Fixed**

* The "contains all of" match was available in the free version by mistake, although it is a paid feature. It is now listed but disabled, marked "(Pro)", like the paid conditions.
* Weight and dimension units were written as "kg" and "cm" whatever the store used. They now follow the WooCommerce product settings, so a store working in pounds and inches is no longer told otherwise.
* Volume, dimensional weight and the [volume] cost token returned nothing on stores measuring in inches or yards, so any rule using them never applied.
* A rule action ("Stop here", "Hide this shipping method", "Apply free shipping") ran even when the rule did not apply: a weight rule for 100–200 kg could stop the calculation, or hide the method, for a 2 kg cart. Actions now only run on rules whose condition is met, so the following rules are read as expected. Shipping costs may change on stores that were relying on the old behavior — check your rules after updating.
* After activation, the plugin's own screen never appeared: the question about sharing usage data took over and left the merchant on an empty settings page. That screen now opens as soon as the question is answered, whatever the answer, and immediately when there is no question to answer.
* The plugin pages disappeared, answering "Sorry, you are not allowed to access this page", while the usage data question was waiting for an answer.

= 1.3.0 =
**Added**

* Starter rule templates: a "Load a template" dropdown above the rules table fills it with ready-made example rules (flat rate, free shipping above an amount, weight-based tiers, free shipping for specific postcodes). Values can be adjusted before saving, and a confirmation is asked before replacing existing rules.
* The method settings page is now organized in collapsible sections: a checkbox next to each section title shows or hides its content, keeping the page short. "General Settings" starts open, the other sections start collapsed.
* Each rule row now has its own duplicate and delete buttons. Duplicating inserts a copy right below with the action reset to "Continue to next rule" for review; deleting asks for confirmation first.
* Debug mode per method: when switched on, administrators see a report on the cart and checkout showing each rule that was evaluated, whether it matched, the cart value it was tested against, and the resulting cost. Customers never see it. Administrators can also add ?debug_shipping=1 to the cart or checkout URL to switch it on temporarily.

**Changed**

* The rules table now always fits the width of the screen: compact dropdowns, balanced column widths, and fields that stay inside their column instead of overflowing into the next one.

**Fixed**

* The "No rules yet" placeholder comes back when the last rule row is deleted, whatever deletion path is used.

= 1.2.2 =
**Added**

* Shipping method names, descriptions, and free shipping labels can now be translated per language when using WPML or Polylang. Values entered by the store owner are shown to customers in their language automatically.
* The "Spend X more to get free shipping" message now appears on cart and checkout pages built with the block editor, in addition to the classic templates.

**Fixed**

* The "Spend X more to get free shipping" notification was not appearing on the cart or checkout page even when correctly configured.
* The "Coupons discounts" option in the free shipping settings is now hidden unless the trigger is set to "Either" or "Both" — it was incorrectly visible when "Minimum amount only" was selected.

= 1.2.0 =
**Added**

* Client-side validation of the rules table before saving: flags rows with no condition selected, empty cost fields, and unrecognised formula tokens, and warns when a method has no rules and no free-shipping trigger configured.
* Confirmation dialog before deleting selected rule rows.
* Explicit "From" / "To" labels on the numeric range condition inputs.
* Inactive-method notice shown in the method settings when the current date is outside the configured start/end date range.
* Live preview of the estimated delivery date as the number of days is entered.
* "No products found" message in the "Contains product" search dropdown.
* Plugin-level settings section heading and description, clarifying that those options apply to every shipping zone and method.

**Changed**

* Clearer rule action labels ("Continue to next rule", "Stop here — use this cost", "Hide this shipping method", "Apply free shipping — stop") with an inline explanation of how rules are evaluated.
* The Free Shipping section now explains the two ways to offer free shipping, dynamically shows or hides the minimum-amount and related fields based on the selected trigger, and warns when the amount is left at 0.
* Expanded inline descriptions for the DIM factor, rule calculation mode, minimum/maximum cost, and date-range fields (including the store timezone).
* Renamed the global "hide other methods" option and clarified that it applies site-wide, across all zones.
* Import and Export pages now describe what the CSV contains and warn about import side effects.
* The method title field shows a customer-facing placeholder to encourage a meaningful name.
* Location condition fields note that matching is case-insensitive and that multiple values are comma-separated.
* Location condition inputs (zipcode, city, state, country) now fill the column width, aligning with the dropdowns above them.
* Restyled the admin section titles for a clearer visual hierarchy.

**Fixed**

* Free shipping settings now initialize correctly on the method settings page.
* Editing a rule's condition could rewrite the wrong row on methods whose saved rule keys were not sequential.
* Plugin styles (warnings, notices, labels) failed to load on the settings page once the review prompt had been dismissed.
* Removed a duplicate tooltip on the condition, operator and action dropdowns.

= 1.1.0 =
* **Added** formula support in rule costs: combine `[qty]`, `[items]`, `[weight]`, `[subtotal]` and `[volume]` with + - * /, e.g. `5+[qty]*1.50` or `[subtotal]*0.08` for a percentage fee.
* **Fixed** "Lowest cost" and "Highest cost" rule modes not returning the correct shipping price.
* **Fixed** WooCommerce compatibility warnings by declaring High-Performance Order Storage (HPOS) and Cart/Checkout Blocks support.
* **Improved** security of the import and export forms.
* **Improved** performance: the plugin only loads its files on the shipping settings pages, the product search in a rule stays fast on large catalogues, and the plugin download is lighter.

= 1.0.4 =
* Add new rules for applying shipping cost.

= 1.0.3 =
* Free shipping based on customer postcode.

= 1.0.2 =
* Conditional shipping cost.

= 1.0.1 =
* Add more options for free shipping.
* Shipping methods can now have a maximum amount.

= 1.0 =
* First release.

== Feedback ==

We are developing this plugin for you. If you find a bug, need a feature, or have any idea, let us know on the plugin support forum or [write to us](mailto:azouamauriac@gmail.com).
