I have The WC()->cart
object that has this structure:
object(WC_Cart)#803 (13) {
["cart_contents"]=>
array(3) {
["e369853df766fa44e1ed0ff613f563bd"]=>
array(11) {
["key"]=>
string(32) "e369853df766fa44e1ed0ff613f563bd"
["product_id"]=>
int(34)
["variation_id"]=>
int(0)
["variation"]=>
array(0) {
}
["quantity"]=>
int(1)
["line_tax_data"]=>
array(2) {
["subtotal"]=>
array(1) {
[1]=>
float(31.5)
}
["total"]=>
array(1) {
[1]=>
float(31.5)
}
}
["line_subtotal"]=>
float(150)
["line_subtotal_tax"]=>
float(31.5)
["line_total"]=>
float(150)
["line_tax"]=>
float(31.5)
["data"]=>
object(WC_Product_Simple)#1251 (12) {
After WC()->cart->cart_contents
I don't know how to get 'line_subtotal'
value.
May I need to convert this object to something else before trying to get any value?