=== Easy Shipping Rate for WooCommerce ===
Contributors: azouamauriac
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.3.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.
* 🌍 **Multilingual ready** — translate your method names, descriptions and labels 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.
* **Distraction-free screens** — on the plugin's own pages you only see the plugin's own messages, not unrelated banners from other extensions.

= 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. No other free shipping plugin makes troubleshooting this easy.

= 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.
* **High-Performance Order Storage (HPOS)** and **Cart/Checkout Blocks** compatibility are declared, so WooCommerce never flags the plugin.

= Why choose Easy Shipping Rate? =

Many shipping plugins ship a deliberately limited base version — often only weight or cart-total rules — and spread everything else across a yearly subscription or a collection of separate add-ons. The features most stores actually need are routinely the ones you have to go looking for.

Easy Shipping Rate puts the essentials and the advanced tools in the same download. All of the following work as soon as you install the plugin, while they commonly cost extra elsewhere:

* **Formula and percentage pricing** — `5+[qty]*1.50` or `[subtotal]*0.08` using cart tokens.
* **Conditions on quantity, line items, volume, dimensional weight, shipping classes and specific products.**
* **Location and user-role targeting** — postcode, city, state, country and customer role.
* **Lowest-cost and highest-cost** rule calculation modes.
* **Stop** and **cancel** rule actions for full control over rule evaluation.
* **Free shipping** triggered by a coupon, a postcode, a minimum amount, or a combination.
* **A "Spend more for free shipping" reminder** on the cart and checkout, including the block editor.
* **Estimated delivery dates** shown at checkout.
* **Minimum and maximum cost** caps per method.
* **CSV import and export** of your methods.
* **Date scheduling** to switch a method on and off automatically.
* **One-click starter templates** and **rule duplication** to build tables fast.
* **A built-in debug report** that shows why each shipping cost was produced — an admin-only troubleshooting tool other plugins simply do not offer.

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

== 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 interface is already translated into several languages.

= 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 plugin? =

Everything documented on this page works as soon as you install the plugin from WordPress.org: formula pricing, conditional rules, location and user-role targeting, free shipping triggers, the progress bar, estimated delivery dates, cost caps, scheduling, CSV import/export, starter templates, rule duplication and the admin-only debug report. There are no separate add-ons to hunt down — one download covers it all, including capabilities that other shipping plugins commonly reserve for a paid plan.

== Screenshots ==

1. Shipping method configuration screen with conditional pricing rules.
2. Shipping method and estimated delivery shown to the customer in the cart.

== Changelog ==

= 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.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.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.1 =
**Changed**

* Reworked the readme for newcomers: added a step-by-step "Quick start" guide for first-time setup, a section summarising everything the plugin includes, and a FAQ entry listing what you get out of the box. The Installation section was kept alongside the new guide.

= 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 initialise 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 the redundant native tooltip on the Select2 condition/operator/action dropdowns.
* Admin scripts now enqueue through `admin_enqueue_scripts` with a dedicated, namespaced handle instead of attaching inline code to the shared jQuery handle.

= 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: all import/export form inputs are now sanitized and nonce-verified.
* **Improved** performance: admin scripts and styles load only on shipping settings pages, not site-wide.
* **Improved** performance: product search in condition rules now uses live AJAX search instead of loading your entire product catalog upfront.
* **Improved** performance: shipping method settings are cached per request to reduce database queries.
* **Reduced** plugin size by removing the bundled select2 library and using the version already included with WooCommerce.

= 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).
