Title: attribute stock update trigger/hook?
Last modified: August 28, 2024

---

# attribute stock update trigger/hook?

 *  Resolved [rosalitoudtohan](https://wordpress.org/support/users/rosalitoudtohan/)
 * (@rosalitoudtohan)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/attribute-stock-update-trigger-hook/)
 * general question: Is there a hook or trigger that can determine if an attribute
   stock was updated? or to tell if attribute stock was reduced during a product
   purchase?
    -  This topic was modified 1 year, 9 months ago by [rosalitoudtohan](https://wordpress.org/support/users/rosalitoudtohan/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Mewz](https://wordpress.org/support/users/mewz/)
 * (@mewz)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/attribute-stock-update-trigger-hook/#post-17980446)
 * Sure. We have this action for when an attribute stock item is updated for any
   reason:
 *     ```wp-block-code
       do_action('mewz_attribute_stock_updated', $stock, $data, $updated);
       ```
   
 * And this action for when one or more attribute stock items are reduced/restored
   from an order item:
 *     ```wp-block-code
       do_action('mewz_wcas_order_item_updated', $hook_data);
       ```
   
 *  Thread Starter [rosalitoudtohan](https://wordpress.org/support/users/rosalitoudtohan/)
 * (@rosalitoudtohan)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/attribute-stock-update-trigger-hook/#post-17984459)
 * do you have any API endpoint that can be used to update the attribute stock thru
   there?
    -  This reply was modified 1 year, 9 months ago by [rosalitoudtohan](https://wordpress.org/support/users/rosalitoudtohan/).
 *  Plugin Author [Mewz](https://wordpress.org/support/users/mewz/)
 * (@mewz)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/attribute-stock-update-trigger-hook/#post-17985399)
 * Is this what you’re looking for?
 * [https://wcas-docs.mewz.dev/rest-api-webhooks](https://wcas-docs.mewz.dev/rest-api-webhooks)
 *  Thread Starter [rosalitoudtohan](https://wordpress.org/support/users/rosalitoudtohan/)
 * (@rosalitoudtohan)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/attribute-stock-update-trigger-hook/#post-17988584)
 * Okay I see. Thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘attribute stock update trigger/hook?’ is closed to new replies.

 * ![](https://ps.w.org/attribute-stock-for-woocommerce/assets/icon-256x256.gif?
   rev=3106385)
 * [Attribute Stock for WooCommerce - Shared Stock & Variable Quantities (Lite Version)](https://wordpress.org/plugins/attribute-stock-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/attribute-stock-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/attribute-stock-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/attribute-stock-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/attribute-stock-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/attribute-stock-for-woocommerce/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [rosalitoudtohan](https://wordpress.org/support/users/rosalitoudtohan/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/attribute-stock-update-trigger-hook/#post-17988584)
 * Status: resolved