| 开发者 | emtiazzahid |
|---|---|
| 更新时间 | 2026年10月26日 19:08 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
SW1A 1AA), a wildcard (PE*) or a range (1000-1999 or 1000...1999). They are matched with the same WooCommerce function shipping zones use. A hyphen between two numbers of the same length, lower number first, is read as a range.wp shipeach rules list [--product=<id>], wp shipeach rules set <product> --country= --state= --postcode= --line= --item=, wp shipeach rules import <file.csv> [--mode=replace|append] and wp shipeach rules export [--out=<file>]._shipeach_enabled and _shipeach_rules), so WooCommerce's "Duplicate" action copies them, and WooCommerce's product CSV export and import carry them when "Export custom meta" is ticked.shipeach_rule_cost filter.shipeach_rules_for_product (the rules used for a cart item), shipeach_rule_matches (whether a rule applies, for example quantity or weight tiers), shipeach_rule_cost (the cost of one cart line), shipeach_package_cost (the total for a package), shipeach_import_rows (CSV rows before import).
Action: shipeach_after_import.
The order shipping line meta _shipeach_breakdown holds product or variation ID → cost.
More plugins by Emtiaz Zahid
/wp-content/plugins/) and activate it.Yes. Tick "Override shipping rules" on the variation and add its rules. The variation's rules then replace the parent product's rules entirely, so an address that matches none of the variation's rules gets the method's default cost, not the parent's rule. Variations without the override use the parent's rules.
Yes. Rates are calculated on the server by WooCommerce's shipping API, so the block cart and checkout (and anything else using the Store API) show the same rate as the classic checkout. Compatibility with the cart and checkout blocks and with HPOS is declared.
The most specific one: a postcode rule, then a state rule, then a country rule, then an "any" rule. If two matching rules are equally specific, the one higher in the table wins.
With the "Per Product Shipping" zone method, the "Products without per-product shipping" setting decides: "Charge nothing for them" (the default) adds nothing for those items, while "Do not offer this method" hides the method whenever the cart contains one, so your other methods apply. A product with per-product shipping on but no rule for the address is charged the method's Default line cost and Default item cost (0 when left blank). When adding costs to other methods, items without a matching rule add nothing.
Adding per-product costs to other methods never changes Free Shipping rates, and leaves Local Pickup unchanged unless you untick "Leave Local Pickup rates unchanged". The "Per Product Shipping" zone method has its own options to hide Free Shipping and Local Pickup whenever it is offered.
Costs are entered and calculated in your store's base currency. Shipeach does not convert them itself; a multi-currency plugin or a small snippet can convert each line's cost with the shipeach_rule_cost filter.
With WP-CLI. Each line is one rule with six columns in this order: product ID (a variation ID is fine), country code, state code, postcode, line cost, item cost. A first line that does not start with a number is skipped as a header. * or an empty country, state or postcode means "any", and an empty cost is 0. Run wp shipeach rules import rules.csv (each product's rules are replaced by the rows given for it) or add --mode=append to add the rows after its existing rules. wp shipeach rules export writes all rules in the same format to the shipeach folder inside your uploads directory. The Tools screen does not upload files.
Its documentation lists the same six columns in the same order (product ID, country code, state code, postcode, line cost, item cost), and the header line is skipped, so wp shipeach rules import reads that layout. Shipeach has not been tested with files exported by the extension itself, so review the imported rules afterwards. Also note that Shipeach uses the most specific matching rule, while that documentation says the first matching row from the top of the table is used.
No. It makes no outbound requests and uses no external service. It charges the costs you enter; it does not fetch carrier rates, print labels or pack boxes.