Hi,
What you’re describing would require custom code, and not something we cover using the settings in the plugin. You can use the bring_shipping_rates
filter to implement custom logic. You could loop through the cart and get weight/dimensions from each product and compare that agains values you define, then override the $rate['cost']
to set the price for the services you want to use.
Here’s some example code that removes the bring rates based on shipping classes. You might be able to adjust this to your needs.
<?php
/**
* Filter the bring shipping rates.
*/
add_filter('bring_shipping_rates', function( $rates ) {
$shipping_classes = [
'heavy',
'pallet',
];
// Look for items with a shipping class that doesn not allow mail.
$items = WC()->cart->get_cart();
foreach ( $items as $item ) {
$shipping_class = $item['data']->get_shipping_class();
if ( in_array( $shipping_class, $shipping_classes ) ) {
return [];
}
}
return $rates;
}, 999 );
If you need help implementing your custom logic then please send us an email at [email protected] and we can estimate the project for you.