Documentation is still being updated. Some content maybe unfinished.
A valid request URL is required to generate request examples{
"subtotal": "116.00",
"subtotal_tax": "11.60",
"shipping_total": "10.00",
"shipping_tax": "1.00",
"shipping_taxes": [
1
],
"discount_total": "23.20",
"discount_tax": "0.00",
"cart_contents_total": "92.80",
"cart_contents_tax": "11.10",
"cart_contents_taxes": [
11.1
],
"fee_total": "5.00",
"fee_tax": "0.50",
"fee_taxes": [
0.5
],
"total": "119.40",
"total_tax": "13.60"
}Get the carts totals.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/v2/cart/totals{
"subtotal": "116.00",
"subtotal_tax": "11.60",
"shipping_total": "10.00",
"shipping_tax": "1.00",
"shipping_taxes": [
1
],
"discount_total": "23.20",
"discount_tax": "0.00",
"cart_contents_total": "92.80",
"cart_contents_tax": "11.10",
"cart_contents_taxes": [
11.1
],
"fee_total": "5.00",
"fee_tax": "0.50",
"fee_taxes": [
0.5
],
"total": "119.40",
"total_tax": "13.60"
}Returns the totals pre-formatted.
Cart totals retrieved successfully.
Cart subtotal.
Cart subtotal tax.
Shipping total.
Shipping tax.
Discount total.
Discount tax.
Cart contents total.
Cart contents tax.
Fee total.
Fee tax.
Cart total.
Total tax.
Was this page helpful?