woocommerce_product_attributes_updated action-hookWC 10.2.0

Fires after WooCommerce product attributes have been updated.

Usage

add_action( 'woocommerce_product_attributes_updated', 'wp_kama_woocommerce_product_attributes_updated_action', 10, 2 );

/**
 * Function for `woocommerce_product_attributes_updated` action-hook.
 * 
 * @param WC_Product $product The product object whose attributes were updated.
 * @param bool       $force   Indicates if the update was forced.
 *
 * @return void
 */
function wp_kama_woocommerce_product_attributes_updated_action( $product, $force ){

	// action...
}
$product(WC_Product)
The product object whose attributes were updated.
$force(true|false)
Indicates if the update was forced.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

WC_Product_Data_Store_CPT::update_attributes()
woocommerce_product_attributes_updated
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1033
do_action( 'woocommerce_product_attributes_updated', $product, $force );

Where the hook is used in WooCommerce

woocommerce/includes/class-wc-post-data.php 78
add_action( 'woocommerce_product_attributes_updated', array( __CLASS__, 'on_product_attributes_updated' ), 10, 1 );