[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?
- Store owners shipping heavy or bulky goods who need to recover real carrier surcharges for overweight shipments.
- Shops with variable order sizes that want to add a handling fee when orders fall below a minimum quantity or total.
- Multi-zone stores that need location-specific fee logic on top of WooCommerce's native shipping zones.
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
- Accurate cost recovery: charge the real extra cost for heavy, bulky, or high-value orders instead of absorbing losses.
- Fewer abandoned carts: transparent, rules-based fees at checkout are more trustworthy than flat-rate surprises.
- Zero code: every rule is configured from the WooCommerce admin — no PHP, no hooks, no child theme edits.
- Non-destructive: works alongside flat rate, free shipping, and any other method in the same zone.
- Multiple instances: add the method more than once in a zone for layered fee structures.
- Performance-friendly: no front-end scripts or styles are loaded; all logic runs only during cart/checkout calculation.
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:
asrfwoo_condition_types — register new condition type definitions (description, operators, input type, step)
asrfwoo_condition_handlers — register the evaluation logic for each condition type
asrfwoo_shipping_cost — filter the final computed cost before it is passed to WooCommerce
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.