=== Defyn Shipping Pro ===
Contributors: defyndigital
Tags: table rate shipping, woocommerce shipping, conditional shipping, free shipping, shipping rules
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 11.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Table rate shipping for WooCommerce with every feature unlocked: weight, price, dimensions, shipping class, product, category, role and time rules.

== Description ==

**Defyn Shipping Pro** lets you charge exactly what shipping costs you. Add it to any WooCommerce shipping zone, build a few rules, and WooCommerce works out the price at checkout based on weight, order value, quantity, size, shipping class, product, category, customer role, day or time.

There is no "Pro" upgrade, licence key or locked feature. Everything described on this page is in the free plugin. It was built by [Defyn](https://defyn.com.au/), a Sydney WooCommerce agency, to run our own clients' stores, from single-product shops to warehouses shipping bulky freight across Australia.

= Why store owners pick it =

* **Every condition, free.** Price, weight, item quantity, cart lines, volume, dimensional weight, max dimension, length / width / height, shipping class, product, category, tag, product field, stock, user role, coupon, day of the week, time of day and "shipping cost so far".
* **Rules that understand your cart.** Product conditions narrow the cart to the matching items. "Shipping class is Bulky" + "Weight 0-20 kg" prices the weight of the bulky items only. No spreadsheets, no hacks.
* **Real-world pricing.** A base cost plus "$X for each started Y": per kg, per item, per cart line, per m³, per dollar (percentage shipping) or as a surcharge on the shipping calculated so far.
* **Free shipping that sells.** Free over a minimum order value, a minimum quantity, with a coupon, or a combination, plus a live "Spend $23 more for free shipping" notice with a progress bar on the cart, checkout, product or shop pages.
* **Switch in minutes.** A one-click importer copies existing Flexible Shipping methods and rules into Defyn Shipping Pro, zone by zone, without touching the originals.
* **Built for the block checkout.** Works with the WooCommerce Cart and Checkout blocks (notices update live as the cart changes), the classic shortcodes, and HPOS.

= Rules =

* Rules run top to bottom. All conditions in a rule must match.
* **Cost per order** plus any number of **additional costs**: "$2 per each 1 kg", "$5 per each item", "$0.15 per each $1 (15%)".
* **Special actions**: *Stop* skips the rules below; *Hide* removes the method (e.g. "too heavy", "we don't ship this class here").
* **Rules calculation**: add up all matched rules, or charge the lowest or highest one. Optional maximum cost.
* Drag to reorder, duplicate, enable / disable and add admin notes to rules.
* **Templates** to start from: weight tiers, order-value bands, percentage of order value, base + per item, progressive per-kg, shipping-class surcharge, hide-for-a-class.
* **Export / import** rules as JSON to copy them between zones or sites.

= Conditions =

* **Cart:** price, weight, item quantity, cart line items.
* **Size:** volume, dimensional weight (with your carrier's DIM factor), max dimension, total overall dimensions (L+W+H), product length, width and height.
* **Product:** shipping class (including "any class" and "no class"), product and variation, category (sub-categories included), tag, product field value or range (any product property or custom field), stock quantity, stock status.
* **Customer:** user role (including guests), coupon code.
* **Date and time:** day of the week, time of day (overnight windows supported).
* **Shipping:** the cost calculated by the rules above.

Range conditions support *is* / *is not*. Product conditions support *matches any*, *all*, *none* or *only*.

= Method settings =

* Title and a short description shown under the rate ("Delivered in 2-4 business days").
* Tax status, and costs entered **including tax** (e.g. GST-inclusive prices).
* Free shipping: minimum order value, minimum item quantity, free-shipping coupon, coupon *or* minimum, coupon *and* minimum; optionally measured before coupon discounts; custom "(Free)" label.
* "Left to free shipping" notice with custom text and progress bar.
* Cart value or per-package calculation (for split / multi-vendor packages).
* Show only to logged-in customers, pre-select as the default method.
* **Debug mode**: shop managers see exactly which rules matched, and why, on the cart page.

= Developer friendly =

Clean, documented filters for rules, cart contents, final cost, free-shipping threshold (multi-currency), custom conditions and notice markup. See the FAQ.

== Installation ==

1. In your dashboard go to **Plugins → Add New**, search for "Defyn Shipping Pro", install and activate. (WooCommerce must be active.)
2. Go to **WooCommerce → Settings → Shipping**, open a shipping zone and click **Add shipping method → Defyn Shipping Pro**.
3. Click **Edit** on the new method, set the title, then add rules, or pick a template from **Start from a template…**.
4. Click **Save changes** and test a few carts.

**Coming from Flexible Shipping?** Go to **WooCommerce → Shipping Pro import**, tick the methods to copy and click **Import selected**. New methods are created disabled so you can review them, then enable them and disable the old ones.

== Frequently Asked Questions ==

= Is there a paid version? =

No. Every feature is included in this plugin. Defyn offers paid setup and custom development if you would like a hand.

= Why doesn't my shipping method show at checkout? =

A method only shows when at least one rule matches the cart. Add a final rule without conditions as a fallback price, or turn on **Debug mode** to see how each rule was evaluated.

= How do product conditions combine with weight or price? =

Conditions run in order and product conditions narrow the cart. "Shipping class is Bulky" followed by "Weight 0-20" checks the weight of the bulky items only, and additional costs in that rule are also calculated on those items.

= How do I charge a percentage of the order value? =

Add a rule with no conditions and an additional cost of 0.15 per each 0.01 based on price, which is 15%. The "Percentage of order value" template sets this up for you.

= My weight bands overlap at the edges. =

Ranges include both ends, so 0-5 and 5-10 both match exactly 5 kg. Use 0-5 and 5.001-10 (as the weight template does), or the *Stop* action on the first band.

= What is dimensional weight? =

Carriers charge on the greater of actual weight and volume ÷ DIM factor. Enter your carrier's DIM factor in the method settings (e.g. 5000 for cm/kg, 166 for in/lb) to use the Dimensional weight condition and additional cost.

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

Yes, including the live "left to free shipping" notice. The classic cart and checkout shortcodes are supported too.

= Does it work with multi-currency plugins? =

Rules are calculated in the store currency. Use the `defyn_shipping_pro_free_shipping_threshold` and `defyn_shipping_pro_calculated_cost` filters to convert amounts for currency switchers.

= Which hooks are available? =

* `defyn_shipping_pro_rules`: filter rules before calculation.
* `defyn_shipping_pro_cart_contents`: filter the normalised cart contents.
* `defyn_shipping_pro_calculated_cost`: filter the final cost.
* `defyn_shipping_pro_is_free_shipping`, `defyn_shipping_pro_free_shipping_threshold`: free shipping decision and threshold.
* `defyn_shipping_pro_condition_definitions` and `defyn_shipping_pro_condition_matches`: register custom conditions.
* `defyn_shipping_pro_prices_include_tax`: whether cart value includes tax.
* `defyn_shipping_pro_free_shipping_notice_html`: notice markup.

= Does the plugin collect any data? =

No. It makes no external requests and sends nothing anywhere.

== Screenshots ==

1. The rules editor: conditions, costs, additional costs and special actions, with a one-line summary of every rule.
2. A live "left to free shipping" notice and the calculated rate in the WooCommerce Cart block.
3. Method settings: free shipping, calculation, DIM factor, visibility and debug mode.
4. Rules overview: every rule summarised on one line. Drag to reorder, duplicate or switch off.
5. One-click import from Flexible Shipping.

== Changelog ==

= 1.0.0 =
* First public release: table rate rules engine, 24 conditions, additional costs, Stop / Hide actions, free shipping and live notice, templates, JSON import / export and Flexible Shipping importer.

== Upgrade Notice ==

= 1.0.0 =
First public release.
