Documentation is still being updated. Some content maybe unfinished.
A valid request URL is required to generate request examples{
"subtotal": "<string>",
"subtotal_tax": "<string>",
"shipping_total": "<string>",
"shipping_tax": "<string>",
"shipping_taxes": [
123
],
"discount_total": "<string>",
"discount_tax": "<string>",
"cart_contents_total": "<string>",
"cart_contents_tax": "<string>",
"cart_contents_taxes": [
123
],
"fee_total": "<string>",
"fee_tax": "<string>",
"fee_taxes": [
123
],
"total": "<string>",
"total_tax": "<string>"
}Calculates the cart totals including taxes, shipping, and discounts.
curl --request POST \
--url {protocol}://{host}/wp-json/cocart/v2/cart/calculate \
--header 'Content-Type: application/json' \
--data '
{
"return_totals": false
}
'{
"subtotal": "<string>",
"subtotal_tax": "<string>",
"shipping_total": "<string>",
"shipping_tax": "<string>",
"shipping_taxes": [
123
],
"discount_total": "<string>",
"discount_tax": "<string>",
"cart_contents_total": "<string>",
"cart_contents_tax": "<string>",
"cart_contents_taxes": [
123
],
"fee_total": "<string>",
"fee_tax": "<string>",
"fee_taxes": [
123
],
"total": "<string>",
"total_tax": "<string>"
}Returns the cart totals once calculated.
Cart totals calculated successfully.
Cart totals when return_totals is true.
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?