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

Article Category
,

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

Article Category

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

Article Category

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

Article Category

Disable decimals in money response

Code snippet is included.

View article

Article Category

Can I install/update CoCart via Composer?

Yes. The best method would be to install/update CoCart from the GitHub repository but you can also do so via https://wpackagist.org/

View article

Article Category

Why CoCart and not WooCommerce Store API?

WooCommerce Store API is limited and designed mainly to focus on their Gutenberg blocks they have developed in React.

View article