Setup Weight and Distance with WooCommerce Distance Rate Shipping Plugin
-
0
I need to workout a shipping fee based on the distance and on the total cart weight. I am using WooCommerce Distance Rate Shipping plugin to get the distance. In their documentation they suggest using a filter hook to have both distance and weight, the only example they provide is as follow:
add_filter( 'woocommerce_distance_rate_shipping_rule_cost_distance_shipping', function( $rule_cost, $rule, $distance, $package ) { $order_total = $package['contents_cost']; if ( $order_total > 100 && $distance <= 5 ) { $rule_cost = 0; } return $rule_cost; }, 10, 4 );
I thought I could write some conditional code and return the shipping cost, but it is not what it does. I could not figure out what each of the paramenters is.
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Setup Weight and Distance with WooCommerce Distance Rate Shipping Plugin’ is closed to new replies.