Linux 软件免费装
Banner图

Advanced Shipping Rules For WooCommerce

开发者 prototipo88
更新时间 2026年6月8日 17:29
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPL-2.0+
版权网址: 版权信息

标签

shipping rules woocommerce shipping conditional shipping shipping cost extra shipping fee

下载

1.0.0 1.0.1

详情介绍:

[youtube http://www.youtube.com/watch?v=jE8xuhBXmdY] Stop losing money on shipping costs — take full control of your WooCommerce shipping fees. Advanced Shipping Rules For WooCommerce 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 — no developer required. 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. Who is this for? How it works The plugin adds a new shipping method — Advanced Shipping Rules — 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. Key benefits Available condition types | Condition | Operators | |---|---| | Cart total (subtotal) | equal to, less than, greater than | | Total cart weight | equal to, less than, greater than | | Number of products | equal to, less than, greater than | Extensible by developers Three WordPress filters let you add custom condition types, evaluation handlers, and adjust the final shipping cost without modifying plugin files: Example: add a custom condition type based on the number of unique product categories in the cart. add_filter( 'asrfwoo_condition_types', function( $types ) { $types['category_count'] = array( 'description' => 'Number of Categories', 'operators' => array( 'greater_than' => 'Greater than', 'less_than' => 'Less than', 'equal' => 'Equal to', ), 'placeholder' => 'Enter category count', 'input_type' => 'number', 'step' => '1', ); return $types; } ); add_filter( 'asrfwoo_condition_handlers', function( $handlers ) { $handlers['category_count'] = function( $operator, $value, $cost, &$group_cost, &$is_condition_met, $cart_weight, $cart_items, $cart_total ) { $categories = array(); foreach ( WC()->cart->get_cart() as $item ) { $terms = get_the_terms( $item['product_id'], 'product_cat' ); if ( $terms ) { foreach ( $terms as $term ) { $categories[ $term->term_id ] = true; } } } $count = count( $categories ); if ( ( $operator === 'greater_than' && $count > (int) $value ) || ( $operator === 'less_than' && $count < (int) $value ) || ( $operator === 'equal' && $count === (int) $value ) ) { $group_cost += $cost; $is_condition_met = true; } }; return $handlers; } ); HPOS compatible: fully tested with WooCommerce High-Performance Order Storage.

安装:

  1. In your WordPress dashboard go to Plugins → Add New Plugin, search for Advanced Shipping Rules For WooCommerce, and click Install Now.
  2. Activate the plugin.
  3. Go to WooCommerce → Settings → Shipping.
  4. Select an existing Shipping Zone or create a new one.
  5. Click Add shipping method, choose Advanced Shipping Rules for WooCommerce, and click Add shipping method.
  6. Click Edit on the new method to open its settings and define your conditions.

屏幕截图:

  • The calculated shipping fee displayed in the storefront cart.
  • Add multiple conditions to a group using AND logic; add multiple groups with OR logic.
  • Choose the condition type: Total Weight, Number of Products, or Cart Total.
  • Advanced Shipping Rules for WooCommerce appears as a native method inside WooCommerce Shipping.
  • Use it exactly like any other native WooCommerce shipping method.
  • The extra fee label shown at checkout inherits the Method Title you set in the plugin settings.

常见问题:

Does this plugin replace WooCommerce's built-in shipping methods?

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.

Can I use multiple instances of this method in one zone?

Yes. Add the method more than once to a zone to layer different fee rules for the same geographic area.

Does it work with WooCommerce shipping classes?

The free version evaluates cart-wide totals (weight, item count, subtotal), not per-product or per-class values.

Can I combine conditions with AND and OR logic?

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.

Will this slow down my store?

No. The plugin loads no front-end assets. The condition evaluation runs only during WooCommerce's shipping calculation phase.

Is it compatible with High-Performance Order Storage (HPOS)?

Yes. The plugin is fully HPOS compatible and does not rely on legacy order meta tables.

The method shows a €0 fee — why?

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.

更新日志:

1.0.1 1.0.0