woocommerce_attribute_updated
Attribute updated.
Использование
add_action( 'woocommerce_attribute_updated', 'wp_kama_woocommerce_attribute_updated_action', 10, 3 );
/**
* Function for `woocommerce_attribute_updated` action-hook.
*
* @param int $id Added attribute ID.
* @param array $data Attribute data.
* @param string $old_slug Attribute old name.
*
* @return void
*/
function wp_kama_woocommerce_attribute_updated_action( $id, $data, $old_slug ){
// action...
}
- $id(int)
- Added attribute ID.
- $data(массив)
- Attribute data.
- $old_slug(строка)
- Attribute old name.
Где вызывается хук
woocommerce_attribute_updated
woocommerce/includes/wc-attribute-functions.php 561
do_action( 'woocommerce_attribute_updated', $id, $data, $old_slug );
Где используется хук в WooCommerce
woocommerce/includes/class-wc-post-data.php 71
add_action( 'woocommerce_attribute_updated', array( __CLASS__, 'handle_global_attribute_updated' ), 50, 3 );