{"id":224552,"date":"2025-03-04T11:41:04","date_gmt":"2025-03-04T11:41:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/advanced-shipping-rules-for-woocommerce\/"},"modified":"2026-06-08T09:29:38","modified_gmt":"2026-06-08T09:29:38","slug":"advanced-shipping-rules-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/advanced-shipping-rules-for-woocommerce\/","author":8872771,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"7.0","requires":"5.6","requires_php":"7.4","requires_plugins":null,"header_name":"Advanced Shipping Rules For WooCommerce","header_author":"Roberto Iacono","header_description":"Conditional Shipping WooCommerce plugin. Manage shipping rates based on custom conditions. Set dynamic shipping rules with ease!","assets_banners_color":"a7c6f2","last_updated":"2026-06-08 09:29:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.robertoiacono.it\/advanced-shipping-rules-for-woocommerce\/","header_author_uri":"https:\/\/www.robertoiacono.it\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":870,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"prototipo88","date":"2025-07-04 13:32:05"},"1.0.1":{"tag":"1.0.1","author":"prototipo88","date":"2026-06-08 09:29:38"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":3564401,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3564401,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3564401,"resolution":"1544x500","location":"assets","locale":"","width":1546,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3564401,"resolution":"772x250","location":"assets","locale":"","width":773,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":3322303,"resolution":"1","location":"assets","locale":"","width":800,"height":355},"screenshot-2.gif":{"filename":"screenshot-2.gif","revision":3322303,"resolution":"2","location":"assets","locale":"","width":800,"height":355},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3564401,"resolution":"3","location":"assets","locale":"","width":1150,"height":595},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3322303,"resolution":"4","location":"assets","locale":"","width":1347,"height":592},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3322303,"resolution":"5","location":"assets","locale":"","width":1347,"height":592},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3322303,"resolution":"6","location":"assets","locale":"","width":1366,"height":946},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3322303,"resolution":"7","location":"assets","locale":"","width":1366,"height":607}},"screenshots":{"1":"How to add Advanced Shipping Rules For WooCommerce as a shipping method and configure conditions.","2":"The calculated shipping fee displayed in the storefront cart.","3":"Add multiple conditions to a group using AND logic; add multiple groups with OR logic.","4":"Choose the condition type: Total Weight, Number of Products, or Cart Total.","5":"Advanced Shipping Rules for WooCommerce appears as a native method inside WooCommerce Shipping.","6":"Use it exactly like any other native WooCommerce shipping method.","7":"The extra fee label shown at checkout inherits the Method Title you set in the plugin settings."}},"plugin_section":[],"plugin_tags":[146193,266167,139499,5030,5023],"plugin_category":[45],"plugin_contributors":[238641],"plugin_business_model":[],"class_list":["post-224552","plugin","type-plugin","status-publish","hentry","plugin_tags-conditional-shipping","plugin_tags-extra-shipping-fee","plugin_tags-shipping-cost","plugin_tags-shipping-rules","plugin_tags-woocommerce-shipping","plugin_category-ecommerce","plugin_contributors-prototipo88","plugin_committers-prototipo88"],"banners":{"banner":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/banner-772x250.png?rev=3564401","banner_2x":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/banner-1544x500.png?rev=3564401","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/icon-128x128.jpg?rev=3564401","icon_2x":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/icon-256x256.jpg?rev=3564401","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-1.gif?rev=3322303","caption":"How to add Advanced Shipping Rules For WooCommerce as a shipping method and configure conditions."},{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-2.gif?rev=3322303","caption":"The calculated shipping fee displayed in the storefront cart."},{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-3.png?rev=3564401","caption":"Add multiple conditions to a group using AND logic; add multiple groups with OR logic."},{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-4.png?rev=3322303","caption":"Choose the condition type: Total Weight, Number of Products, or Cart Total."},{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-5.png?rev=3322303","caption":"Advanced Shipping Rules for WooCommerce appears as a native method inside WooCommerce Shipping."},{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-6.png?rev=3322303","caption":"Use it exactly like any other native WooCommerce shipping method."},{"src":"https:\/\/ps.w.org\/advanced-shipping-rules-for-woocommerce\/assets\/screenshot-7.png?rev=3322303","caption":"The extra fee label shown at checkout inherits the Method Title you set in the plugin settings."}],"raw_content":"<!--section=description-->\n<p>[youtube http:\/\/www.youtube.com\/watch?v=jE8xuhBXmdY]<\/p>\n\n<p><strong>Stop losing money on shipping costs \u2014 take full control of your WooCommerce shipping fees.<\/strong><\/p>\n\n<p><strong>Advanced Shipping Rules For WooCommerce<\/strong> lets you create smart, conditional shipping rules that automatically apply extra fees based on what's actually in the cart: total weight, number of items, or subtotal. Define as many conditions as you need, combine them with AND\/OR logic, and let the plugin handle the rest at checkout \u2014 no developer required.<\/p>\n\n<p>Whether you run a small shop or a high-volume store, getting shipping costs right is critical for both profitability and customer satisfaction. This plugin gives you the precision tooling you need.<\/p>\n\n<p><strong>Who is this for?<\/strong><\/p>\n\n<ul>\n<li><strong>Store owners shipping heavy or bulky goods<\/strong> who need to recover real carrier surcharges for overweight shipments.<\/li>\n<li><strong>Shops with variable order sizes<\/strong> that want to add a handling fee when orders fall below a minimum quantity or total.<\/li>\n<li><strong>Multi-zone stores<\/strong> that need location-specific fee logic on top of WooCommerce's native shipping zones.<\/li>\n<\/ul>\n\n<p><strong>How it works<\/strong><\/p>\n\n<p>The plugin adds a new shipping method \u2014 <em>Advanced Shipping Rules<\/em> \u2014 directly inside WooCommerce's native shipping zones. You configure groups of conditions for each zone. When a customer's cart matches a group, the defined extra fee is applied. Multiple groups use OR logic; conditions inside a group use AND logic. The highest matching fee wins, so you stay in control even when several rules could apply.<\/p>\n\n<p><strong>Key benefits<\/strong><\/p>\n\n<ul>\n<li><strong>Accurate cost recovery<\/strong>: charge the real extra cost for heavy, bulky, or high-value orders instead of absorbing losses.<\/li>\n<li><strong>Fewer abandoned carts<\/strong>: transparent, rules-based fees at checkout are more trustworthy than flat-rate surprises.<\/li>\n<li><strong>Zero code<\/strong>: every rule is configured from the WooCommerce admin \u2014 no PHP, no hooks, no child theme edits.<\/li>\n<li><strong>Non-destructive<\/strong>: works alongside flat rate, free shipping, and any other method in the same zone.<\/li>\n<li><strong>Multiple instances<\/strong>: add the method more than once in a zone for layered fee structures.<\/li>\n<li><strong>Performance-friendly<\/strong>: no front-end scripts or styles are loaded; all logic runs only during cart\/checkout calculation.<\/li>\n<\/ul>\n\n<p><strong>Available condition types<\/strong><\/p>\n\n\n\n\n  Condition\n  Operators\n\n\n\n\n  Cart total (subtotal)\n  equal to, less than, greater than\n\n\n  Total cart weight\n  equal to, less than, greater than\n\n\n  Number of products\n  equal to, less than, greater than\n\n\n\n\n<p><strong>Extensible by developers<\/strong><\/p>\n\n<p>Three WordPress filters let you add custom condition types, evaluation handlers, and adjust the final shipping cost without modifying plugin files:<\/p>\n\n<ul>\n<li><code>asrfwoo_condition_types<\/code> \u2014 register new condition type definitions (description, operators, input type, step)<\/li>\n<li><code>asrfwoo_condition_handlers<\/code> \u2014 register the evaluation logic for each condition type<\/li>\n<li><code>asrfwoo_shipping_cost<\/code> \u2014 filter the final computed cost before it is passed to WooCommerce<\/li>\n<\/ul>\n\n<p>Example: add a custom condition type based on the number of unique product categories in the cart.<\/p>\n\n<pre><code>add_filter( 'asrfwoo_condition_types', function( $types ) {\n    $types['category_count'] = array(\n        'description' =&gt; 'Number of Categories',\n        'operators'   =&gt; array(\n            'greater_than' =&gt; 'Greater than',\n            'less_than'    =&gt; 'Less than',\n            'equal'        =&gt; 'Equal to',\n        ),\n        'placeholder' =&gt; 'Enter category count',\n        'input_type'  =&gt; 'number',\n        'step'        =&gt; '1',\n    );\n    return $types;\n} );\n\nadd_filter( 'asrfwoo_condition_handlers', function( $handlers ) {\n    $handlers['category_count'] = function( $operator, $value, $cost, &amp;$group_cost, &amp;$is_condition_met, $cart_weight, $cart_items, $cart_total ) {\n        $categories = array();\n        foreach ( WC()-&gt;cart-&gt;get_cart() as $item ) {\n            $terms = get_the_terms( $item['product_id'], 'product_cat' );\n            if ( $terms ) {\n                foreach ( $terms as $term ) {\n                    $categories[ $term-&gt;term_id ] = true;\n                }\n            }\n        }\n        $count = count( $categories );\n        if ( ( $operator === 'greater_than' &amp;&amp; $count &gt; (int) $value ) ||\n             ( $operator === 'less_than'    &amp;&amp; $count &lt; (int) $value ) ||\n             ( $operator === 'equal'        &amp;&amp; $count === (int) $value ) ) {\n            $group_cost      += $cost;\n            $is_condition_met = true;\n        }\n    };\n    return $handlers;\n} );\n<\/code><\/pre>\n\n<p><strong>HPOS compatible<\/strong>: fully tested with WooCommerce High-Performance Order Storage.<\/p>\n\n<h3>How to Use<\/h3>\n\n<ol>\n<li>Open the method settings after adding it to a shipping zone.<\/li>\n<li>Click <strong>Add Group<\/strong> to create a rule group.<\/li>\n<li>Inside the group, click <strong>Add Condition<\/strong> and choose a condition type (weight, item count, or cart total), an operator, a threshold value, and an extra fee amount.<\/li>\n<li>Add more conditions to the same group (all must match \u2014 AND logic) or add a second group (either group can match \u2014 OR logic).<\/li>\n<li>Click <strong>Save changes<\/strong>. The fees will be applied automatically at checkout when the cart meets the defined conditions.<\/li>\n<\/ol>\n\n<p><strong>Example setups<\/strong><\/p>\n\n<ul>\n<li>Charge \u20ac5 extra when total cart weight exceeds 20 kg.<\/li>\n<li>Charge \u20ac3 extra when the order contains fewer than 3 items.<\/li>\n<li>Charge \u20ac10 extra when cart total is below \u20ac50 AND weight exceeds 10 kg.<\/li>\n<\/ul>\n\n<h3>License<\/h3>\n\n<p>This plugin is released under the <a href=\"https:\/\/www.gnu.org\/licenses\/gpl-2.0.html\">GPL-2.0+<\/a> license.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>In your WordPress dashboard go to <strong>Plugins \u2192 Add New Plugin<\/strong>, search for <em>Advanced Shipping Rules For WooCommerce<\/em>, and click <strong>Install Now<\/strong>.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to <strong>WooCommerce \u2192 Settings \u2192 Shipping<\/strong>.<\/li>\n<li>Select an existing <strong>Shipping Zone<\/strong> or create a new one.<\/li>\n<li>Click <strong>Add shipping method<\/strong>, choose <strong>Advanced Shipping Rules for WooCommerce<\/strong>, and click <strong>Add shipping method<\/strong>.<\/li>\n<li>Click <strong>Edit<\/strong> on the new method to open its settings and define your conditions.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20replace%20woocommerce%27s%20built-in%20shipping%20methods%3F\"><h3>Does this plugin replace WooCommerce's built-in shipping methods?<\/h3><\/dt>\n<dd><p>No. It adds a new method that you place inside a shipping zone alongside flat rate, free shipping, or any other method. Each method calculates independently.<\/p><\/dd>\n<dt id=\"can%20i%20use%20multiple%20instances%20of%20this%20method%20in%20one%20zone%3F\"><h3>Can I use multiple instances of this method in one zone?<\/h3><\/dt>\n<dd><p>Yes. Add the method more than once to a zone to layer different fee rules for the same geographic area.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20woocommerce%20shipping%20classes%3F\"><h3>Does it work with WooCommerce shipping classes?<\/h3><\/dt>\n<dd><p>The free version evaluates cart-wide totals (weight, item count, subtotal), not per-product or per-class values.<\/p><\/dd>\n<dt id=\"can%20i%20combine%20conditions%20with%20and%20and%20or%20logic%3F\"><h3>Can I combine conditions with AND and OR logic?<\/h3><\/dt>\n<dd><p>Yes. Conditions within a single group are AND-ed (all must pass). Multiple groups are OR-ed (any matching group triggers its fee). The highest fee across all matching groups is applied.<\/p><\/dd>\n<dt id=\"will%20this%20slow%20down%20my%20store%3F\"><h3>Will this slow down my store?<\/h3><\/dt>\n<dd><p>No. The plugin loads no front-end assets. The condition evaluation runs only during WooCommerce's shipping calculation phase.<\/p><\/dd>\n<dt id=\"is%20it%20compatible%20with%20high-performance%20order%20storage%20%28hpos%29%3F\"><h3>Is it compatible with High-Performance Order Storage (HPOS)?<\/h3><\/dt>\n<dd><p>Yes. The plugin is fully HPOS compatible and does not rely on legacy order meta tables.<\/p><\/dd>\n<dt id=\"the%20method%20shows%20a%20%E2%82%AC0%20fee%20%E2%80%94%20why%3F\"><h3>The method shows a \u20ac0 fee \u2014 why?<\/h3><\/dt>\n<dd><p>A fee is only added to the cart when at least one group matches and its cost is greater than zero. Check that your condition values and costs are saved correctly, and that the active cart meets the threshold you set.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed minor bugs in condition saving and display logic.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Cart total, cart weight, and product quantity conditions with AND\/OR group logic.<\/li>\n<\/ul>","raw_excerpt":"Add conditional shipping fees in WooCommerce based on cart weight, item count, and cart total \u2014 no coding needed.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/224552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=224552"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/prototipo88"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=224552"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=224552"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=224552"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=224552"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=224552"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=224552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}