Skip to main content
GET
/
cart
/
items
/
count
Count cart items
curl --request GET \
  --url {protocol}://{host}/wp-json/cocart/v2/cart/items/count
5

Query Parameters

return
enum<string>

Return count as a string or array format.

Available options:
numeric

Response

Cart item count retrieved successfully.

Number of items in the cart.

Example:

5