Hello, I make some calculations (change product weight based on dimensions) and I change the cart total weight using the “woocommerce_cart_contents_weight” filter. The weight is changed successfully according to my rules and if I print
echo WC()->cart->cart_contents_weight;then my custom weight shows up.
The problem is that your plugin seems not to take the cart weight into account and the shipping costs are not changing. Why? Do you calculate again the weight on your own?
Can I change your total weight calculation using a filter?
- The topic ‘I change cart total weight with filter but shipping costs are not changing’ is closed to new replies.