{"id":371565,"date":"2026-09-26T14:54:32","date_gmt":"2026-09-26T14:54:32","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/webangon-shipping-rules\/"},"modified":"2026-09-26T14:23:47","modified_gmt":"2026-09-26T14:23:47","slug":"webangon-shipping-rules","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/webangon-shipping-rules\/","author":15600099,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"trunk","tested":"7.1.2","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"Shipping Rules Builder for WooCommerce","header_author":"webangon","header_description":"Rule-based WooCommerce shipping with a split-screen rule builder and a live test cart, so every rule can be verified in the backend before it goes live.","assets_banners_color":"708b9c","last_updated":"2026-09-26 14:23:47","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":22,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.gif":{"filename":"icon-128x128.gif","revision":3714331,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.gif":{"filename":"icon-256x256.gif","revision":3714331,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3714331,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3714331,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3714357,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"Shipping Rules Builder for WooCommerce \\u2013 live preview\",\"description\":\"WooCommerce store with sample products and a shipping method pre-filled with example rules.\",\"author\":\"webangon\",\"categories\":[\"WooCommerce\",\"Shipping\"]},\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=wc-settings&tab=shipping&instance_id=1\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"login\":true,\"steps\":[{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"webangon-shipping-rules\"},\"options\":{\"activate\":true}},{\"step\":\"setSiteOptions\",\"options\":{\"woocommerce_store_address\":\"1 Demo Street\",\"woocommerce_store_city\":\"New York\",\"woocommerce_default_country\":\"US:NY\",\"woocommerce_store_postcode\":\"10001\",\"woocommerce_currency\":\"USD\",\"woocommerce_weight_unit\":\"kg\",\"woocommerce_coming_soon\":\"no\",\"woocommerce_task_list_hidden\":\"yes\",\"woocommerce_show_marketplace_suggestions\":\"no\",\"woocommerce_allow_tracking\":\"no\",\"woocommerce_onboarding_profile\":{\"skipped\":true}}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire_once '\\\/wordpress\\\/wp-load.php';\\n\\n$products = array(\\n\\tarray( 'Hoodie', '39.00', '1.7' ),\\n\\tarray( 'Sneakers', '59.00', '2.6' ),\\n\\tarray( 'T-Shirt', '15.00', '0.3' ),\\n\\tarray( 'Backpack', '45.00', '1.2' ),\\n);\\nforeach ( $products as $p ) {\\n\\t$product = new WC_Product_Simple();\\n\\t$product->set_name( $p[0] );\\n\\t$product->set_regular_price( $p[1] );\\n\\t$product->set_weight( $p[2] );\\n\\t$product->set_status( 'publish' );\\n\\t$product->save();\\n}\\n\\n$zone = new WC_Shipping_Zone();\\n$zone->set_zone_name( 'United States' );\\n$zone->add_location( 'US', 'country' );\\n$zone->save();\\n$instance_id = $zone->add_shipping_method( 'wbs_flexible_shipping' );\\n\\n$rules = array(\\n\\tarray(\\n\\t\\t'label'       => 'Light parcels',\\n\\t\\t'group_logic' => 'any',\\n\\t\\t'groups'      => array( array( 'logic' => 'all', 'conditions' => array( array( 'type' => 'weight', 'min' => '', 'max' => '5' ) ) ) ),\\n\\t\\t'cost'        => array( 'base' => '4.90' ),\\n\\t),\\n\\tarray(\\n\\t\\t'label'       => 'Heavy parcels',\\n\\t\\t'group_logic' => 'any',\\n\\t\\t'groups'      => array( array( 'logic' => 'all', 'conditions' => array( array( 'type' => 'weight', 'min' => '5', 'max' => '' ) ) ) ),\\n\\t\\t'cost'        => array(\\n\\t\\t\\t'base'   => '4.90',\\n\\t\\t\\t'extras' => array( array( 'amount' => '1', 'per' => '1', 'of' => 'weight', 'above' => '5', 'round' => 'ceil' ) ),\\n\\t\\t),\\n\\t),\\n);\\n\\nupdate_option(\\n\\t'woocommerce_wbs_flexible_shipping_' . $instance_id . '_settings',\\n\\tarray(\\n\\t\\t'title'      => 'Standard shipping',\\n\\t\\t'tax_status' => 'taxable',\\n\\t\\t'rules'      => WBSFS_Rules::sanitize( $rules ),\\n\\t)\\n);\\n\"}]}"}},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[146193,3546,30112,50882,286],"plugin_category":[45],"plugin_contributors":[183622],"plugin_business_model":[],"class_list":["post-371565","plugin","type-plugin","status-publish","hentry","plugin_tags-conditional-shipping","plugin_tags-shipping","plugin_tags-table-rate","plugin_tags-weight-based-shipping","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-webangon","plugin_committers-webangon"],"banners":{"banner":"https:\/\/ps.w.org\/webangon-shipping-rules\/assets\/banner-772x250.png?rev=3714331","banner_2x":"https:\/\/ps.w.org\/webangon-shipping-rules\/assets\/banner-1544x500.png?rev=3714331","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/webangon-shipping-rules\/assets\/icon-128x128.gif?rev=3714331","icon_2x":"https:\/\/ps.w.org\/webangon-shipping-rules\/assets\/icon-256x256.gif?rev=3714331","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Build shipping rates from rules, and <strong>test them before they go live<\/strong>. The settings page is split in two: the rule builder on the left, a test cart on the right that re-evaluates your <em>unsaved<\/em> rules on every keystroke and shows exactly which condition passed or failed and how the cost was built.<\/p>\n\n<p><strong>Conditions<\/strong><\/p>\n\n<ul>\n<li>Cart subtotal (incl.\/excl. tax, before\/after coupons), weight, item quantity, distinct products<\/li>\n<li>Shipping class \u2013 cart includes any \/ only contains \/ includes none<\/li>\n<li>Day of week<\/li>\n<\/ul>\n\n<p><strong>Rules<\/strong><\/p>\n\n<ul>\n<li>Any number of rules; conditions combine with all \/ any<\/li>\n<li>Cost = base + any number of per-unit costs (per N kg \/ items \/ currency, optionally only above a threshold, rounded up \/ down \/ exact), with a per-rule minimum and maximum<\/li>\n<li>Enable\/disable, duplicate, drag to reorder, \"stop after this rule matches\"<\/li>\n<li>Undo \/ redo (Ctrl+Z), 9 rule templates in a searchable gallery, import \/ export as JSON<\/li>\n<li>Rule checks: unreachable rules, inverted ranges, empty selections, gaps and overlaps between range rules<\/li>\n<\/ul>\n\n<p><strong>Free shipping<\/strong><\/p>\n\n<ul>\n<li>Free from a subtotal threshold, honour free-shipping coupons, custom label when free, optionally hide the other methods<\/li>\n<li>\"Add X more for free shipping\" <strong>progress bar<\/strong> (or text) on the classic <em>and<\/em> block cart \/ checkout, updating live<\/li>\n<\/ul>\n\n<p><strong>Testing &amp; debugging<\/strong><\/p>\n\n<ul>\n<li>Test cart with real products (search by name or SKU), quantities and date &amp; time<\/li>\n<li>Verdict, cart figures, per-condition pass\/fail trace, full cost arithmetic, MATCH \/ NO MATCH badges on the rule cards<\/li>\n<li>Storefront debug trace for shop managers only (classic and block)<\/li>\n<\/ul>\n\n<h4>Pro add-on<\/h4>\n\n<p><a href=\"https:\/\/brainstation-23.com\/\">WBS Flexible Shipping Pro<\/a> is a separate add-on plugin. It adds 24 more conditions (postcode, city, state, products, categories, attributes, customers, payment method, coupon codes, dates, sizes), item-scoped figures, alternative (OR) condition groups, tier tables, formulas and percentage costs, rule actions (withdraw the method, rename it, delivery estimates, customer notices, hide other methods), lowest \/ highest \/ first-match combining, method minimum \/ maximum, saved test scenarios, load-a-real-order, a zone view, revisions, copy to zone and 26 more templates.<\/p>\n\n<p>Everything you build in the free plugin keeps working when you add Pro. If Pro is deactivated later, rules that depend on it are <strong>kept unchanged and skipped<\/strong> (never silently altered) until it is active again.<\/p>\n\n<h4>For developers<\/h4>\n\n<p>The plugin is extensible without touching its files:<\/p>\n\n<ul>\n<li>PHP filters: <code>wbsfs_conditions<\/code>, <code>wbsfs_sanitize_condition<\/code>, <code>wbsfs_sanitize_rule<\/code>, <code>wbsfs_sanitize_cost<\/code>, <code>wbsfs_rule_cost<\/code>, <code>wbsfs_rule_effects<\/code>, <code>wbsfs_engine_matched<\/code>, <code>wbsfs_engine_combine<\/code>, <code>wbsfs_engine_final<\/code>, <code>wbsfs_form_fields<\/code>, <code>wbsfs_lint<\/code>, <code>wbsfs_extras_html<\/code>, <code>wbsfs_admin_data<\/code>, <code>wbsfs_preview_result<\/code>, and more. A condition definition may carry its own <code>evaluate<\/code> callback.<\/li>\n<li>JavaScript: <code>wp.hooks<\/code> filters and actions named <code>wbsfs.*<\/code>, plus helpers on <code>window.WBSFS_API<\/code>. Add-on scripts depend on the <code>wbsfs-admin<\/code> handle; the editor boots on DOM ready, after they registered.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the folder to <code>wp-content\/plugins\/<\/code> and activate. WooCommerce must be active.<\/li>\n<li>WooCommerce \u2192 Settings \u2192 Shipping \u2192 open a zone \u2192 Add shipping method \u2192 <strong>WBS Flexible Shipping<\/strong>.<\/li>\n<li>Click the method to open the split editor. Add rules on the left, test on the right, Save.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20do%20i%20not%20see%20the%20method%20on%20the%20cart%3F\"><h3>Why do I not see the method on the cart?<\/h3><\/dt>\n<dd><p>Rules only run for customers the shipping zone matches, and the method is only offered when at least one cost rule matches (or free shipping applies). Turn on \"Storefront debug\" in the Settings tab to see the trace on the cart as a shop manager.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20rules%20if%20i%20deactivate%20the%20pro%20add-on%3F\"><h3>What happens to my rules if I deactivate the Pro add-on?<\/h3><\/dt>\n<dd><p>Rules that use Pro features are skipped and shown as \"switched off\" in the editor. Their data is kept exactly as it was, even if you save in the meantime, and they work again when Pro is active.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: split-screen rule builder with live test cart, cart subtotal \/ weight \/ quantity \/ shipping class \/ day-of-week conditions, per-unit costs, free shipping with progress bar (classic and block cart), rule checks, templates, import \/ export and developer hooks.<\/li>\n<\/ul>","raw_excerpt":"Rule-based WooCommerce shipping with a split-screen rule builder and a live backend test cart.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/371565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=371565"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/webangon"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=371565"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=371565"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=371565"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=371565"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=371565"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=371565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}