Weight and Sizes not coming from the cart item
-
Hi,
The weight and sizes that you pass on to your API for the price calculations should not come from the product’s weight and size, but from the cart item data instead.
Some plugins or custom implementations may use the
woocommerce_before_calculate_totals
filter to programmatically change these values, but they are ignored by the plugin, passing on static values set in the edit product page.The fix should be as simple as replacing the
$cartItem
variable with$quoteItem['data']
inclass-shippit-method.php
lines 265-268. The variables are unintuitively named, because$cartItem
refers to aWC_Product
instance 🙂Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.