Title: Running hooks
Last modified: September 17, 2022

---

# Running hooks

 *  Resolved [rolfhuiber](https://wordpress.org/support/users/rolfhuiber/)
 * (@rolfhuiber)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/running-hooks/)
 * When a product is saved in WooCommerce/Products the hook _woocommerce\_admin\
   _process\_product\_object_ is run.
 * As Smart Manager does not run this hook, is it possible to add hooks?

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

 *  Plugin Author [storeapps](https://wordpress.org/support/users/storeapps/)
 * (@storeapps)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/running-hooks/#post-16027237)
 * [@rolfhuiber](https://wordpress.org/support/users/rolfhuiber/) ,
 * Would like to update you that currently Smart Manager won’t trigger `woocommerce_admin_process_product_object`
   hook when updating the product.
    We have taken a note of the same and will surely
   update you once support for the same is added.
 * Alternatively, currently Smart Manager plugin has `sm_inline_update_pre` filter
   using which you can write a custom code and trigger the same hook.
 *  Thread Starter [rolfhuiber](https://wordpress.org/support/users/rolfhuiber/)
 * (@rolfhuiber)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/running-hooks/#post-16529673)
 * I looked into the hook you suggested. As it has been some time ago and I haven’t
   picked it up again, when I am not mistaken, the provided $edited_data does not
   contain a product_id (product_id of the (newly created) variation). Or does it?
 * Currently I run the WooCommerce product edit to publish, which runs the WooCommerce
   hook.
 *  Plugin Author [storeapps](https://wordpress.org/support/users/storeapps/)
 * (@storeapps)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/running-hooks/#post-16532674)
 * [@rolfhuiber](https://wordpress.org/support/users/rolfhuiber/) ,
   Would like to
   update you that `$edited_data` array will have product variation id when updating
   the existing variable product. Please try to use `sm_inline_update_pre` custom
   filter and let us know your views on the same.
 *  Thread Starter [rolfhuiber](https://wordpress.org/support/users/rolfhuiber/)
 * (@rolfhuiber)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/running-hooks/#post-16532883)
 * The code run from the WooCommerce hook does the following:
   if product is “variable”
   get children (variations)for each childget length of the variable product (get_attributes)
   adapt SKU: based on variable product SKU + length
 * The code expects the SKU of the variable product already to be saved.
 * `sm_inline_update_pre` is run before the edited data is saved in the DB.
 * The product_id I get from your hook, I checked that before, so just have to get
   the $product and call my code (which worked in a mock).
 * Can you please implement a similar hook which is run after the edited data is
   saved.
 *  Plugin Author [storeapps](https://wordpress.org/support/users/storeapps/)
 * (@storeapps)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/running-hooks/#post-16558671)
 * [@rolfhuiber](https://wordpress.org/support/users/rolfhuiber/) ,
   Thank you for
   getting back to us.
 * Would like to update you that the Smart Manager plugin has a `sm_inline_update_post`
   custom action which is fired after data is saved in the database and also after`
   sm_inline_update_pre` custom filter. 
   Request you to try using the above custom
   action and do let us know your views.
 *  Thread Starter [rolfhuiber](https://wordpress.org/support/users/rolfhuiber/)
 * (@rolfhuiber)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/running-hooks/#post-16567673)
 * `sm_inline_update_post` worked, thanks for your help.
 *  Plugin Author [storeapps](https://wordpress.org/support/users/storeapps/)
 * (@storeapps)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/running-hooks/#post-16571558)
 * [@rolfhuiber](https://wordpress.org/support/users/rolfhuiber/) ,
   You’re welcome
   🙂

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

The topic ‘Running hooks’ is closed to new replies.

 * ![](https://ps.w.org/smart-manager-for-wp-e-commerce/assets/icon-256x256.png?
   rev=2356252)
 * [Smart Manager - Advanced WooCommerce Bulk Edit & Inventory Management](https://wordpress.org/plugins/smart-manager-for-wp-e-commerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-manager-for-wp-e-commerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-manager-for-wp-e-commerce/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-manager-for-wp-e-commerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-manager-for-wp-e-commerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-manager-for-wp-e-commerce/reviews/)

## Tags

 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 7 replies
 * 2 participants
 * Last reply from: [storeapps](https://wordpress.org/support/users/storeapps/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/running-hooks/#post-16571558)
 * Status: resolved