Categories: Developer (1) · Getting Started (1) · Questions (15) · Requesting support from us (9) · Snippets (9) · WP-CLI (1)

How do you add a product to cart with a custom price?

This is the most simplest way of adding a product to the cart with a custom price. The price is not changing, what am I doing wrong? You may have restricted the product or all products from being able to add the product to cart with a custom price. Or you have set a salt […]

View article

Allow specific products to override the price

Using the filter cocart_is_allowed_to_override_price, you can run through a loop of product ID’s to return the statement as true for them only and return false for every other product your not checking. This will allow you to only override the price of those products and no other.

View article

How to update items in cart in bulk

With the new update cart callback system in place you can now update the quantity of items in the cart in bulk. Simply pass the item key and the quantity for each item you wish to change and the quantity of those items will update.

View article

Disable decimals in money response

Code snippet is included.

View article

Removing the Cart Item Key – API v1

What you see when you return the cart contents is how WooCommerce formats the data. However, via the REST API this particular key is not a requirement.

View article

Disable Load Cart from Session

As the only feature in CoCart that does not use the REST API, some developers requested that they have the option to disable it.

View article