I’m trying to do some custom totals calculations in the cart. I’ve got these “Fees” but they are not cart-wide fees, they are per product fees. I’m able to add them to the cart item meta, but any line item calculations I try to do are overridden. Here is the code I have so far. I’ve tried updating the values using both woocommerce_before_calculate_totals and woocommerce_after_calculate_totals:
The weird thing is, the changes to cart meta stay but the total changes do not. This is something I can do, right? I know some of the cart properties must be updating using methods, but I did not see any for updating individual cart item properties beyond what I’ve done in my code.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com