1. WooCommerce Quantity Manager
  2. Developer Documentation

Updating quantity rules via the REST API

When you use WooCommerce Quantity Manager, you can programatically update product and variation-level quantity rules using the REST API.

To do so, you need to use one of the following endpoints:

  • http://woocommerce.github.io/woocommerce-rest-api-docs/#update-a-product
  • https://woocommerce.github.io/woocommerce-rest-api-docs/#update-a-product-variation

The metadata keys are as follows:

Min Max Quantity Rules

'product' - '_wqm_product_quantity'
'variation' - '_wqm_variation_product_quantity'

Min Max Value Rules

'product' - '_wqm_product_value'
'variation' - '_wqm_variation_product_value'

Default Quantity Rules

'product' - '_product_default_quantity'
'variation' - '_wqm_variation_default_quantity'

these endpoints

The metadata keys are as follows:

Min Max Quantity Rules

'product' - '_wqm_product_quantity'
'variation' - '_wqm_variation_product_quantity'

Min Max Value Rules

'product' - '_wqm_product_value'
'variation' - '_wqm_variation_product_value'

Default Quantity Rules

'product' - '_product_default_quantity'
'variation' - '_wqm_variation_default_quantity'

Quantity Step Rules
'product' - '_wqm_product_step'
'variation' - '_wqm_variation_product_step'

'product' - '_wqm_product_step'
'variation' - '_wqm_variation_product_step'

We've partnered with Codeable to provide our customers with expert help if required.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.