WooCommerce add-on: Shop order total weight empty
I added your Total Order Weight column only to find that the weight of product variations is omitted.
I took a peek in the file ac-addon-woocommerce/classes/Column/ShopOrder/TotalWeight.php and modified it to make it work.
$weight = (int) $item->get_quantity() * (float) get_post_meta( $item->get_product_id(), '_weight', true );
$weight = (int) $item->get_quantity() * (float) $item->get_product()->get_weight();
If you find a more efficient fix, please let me know when the updated plugin will be available and/or what code you’re gonna use so I can update my cowboy style hotfix :D
You must be logged in to reply to this topic.