'WooCommerce get total of additional fees added to cart
Depending on the cart total, I add an additional fee to each order
$cart_fee = 6.64;
if ($cart_total > 0)
WC()->cart->add_fee(__('Shipping Insurance', 'txtdomain'), $cart_fee);
Now I need to get a total of those fees by date range by either an SQL query or a piece of code that would print these values out on a custom page.
I'm posting this question while researching but I am hoping I can get some ideas before it costs me hours of time.
Solution 1:[1]
Below are the two DB tables and their connections for you to start with.
Using the order_item_id, query to the item_meta table for getting the values.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mujuonly |


