=== 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: 4.7.0 Tested up to: 7.0 Requires PHP: 7.4 WC requires at least: 4.0.0 WC tested up to: 10.8 Stable tag: 1.2.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Create flexible, conditional WooCommerce shipping methods based on cart total, weight, dimensions, products, location, user role and more. == 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 using flexible conditions that match your exact business rules. 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. * Display a **free shipping progress bar** ("Spend $X more to unlock free shipping") on the cart page. * Set a **minimum and maximum cost** per method. * Show customers a custom **description and estimated delivery date** at checkout. * 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. == Installation == 1. Make sure WooCommerce is installed and activated. 2. Upload the plugin files to the `/wp-content/plugins/easy-shipping-rate` directory, or install the plugin through the WordPress Plugins screen directly. 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. == 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. = 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. == 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.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:digitcode0@gmail.com).