Skip to main content

Cart and checkout

The Store API cart (/wp-json/wc/store/v1/cart) and checkout total through WooCommerce’s own cart, where Joinery applies its rules, so you don’t need anything extra:
  • Each item’s prices.price is the unit price after Joinery rules. prices.regular_price is the product’s regular price, so you can show a strikethrough.
  • Cart-wide discounts appear in the cart’s fees list as a negative fee named Discount, and are included in totals.
Cart item (excerpt)

Quantity breaks on products

Products get a joinery extension with the unit price from each quantity where it changes, for the current customer. It always starts at quantity 1.
Response (excerpt)
Prices are integers in minor units, as strings, like the rest of the Store API: "1080" with currency_minor_unit: 2 is 10.80. Quantity breaks come from actions that declare them, such as Dynamic Pricing’s Tiered price by quantity. Every rule condition still applies, so a break only appears when this product’s price really changes at that quantity for this customer.