woocommerce_attribute_deleted
After deleting an attribute.
Usage
add_action( 'woocommerce_attribute_deleted', 'wp_kama_woocommerce_attribute_deleted_action', 10, 3 );
/**
* Function for `woocommerce_attribute_deleted` action-hook.
*
* @param int $id Attribute ID.
* @param string $name Attribute name.
* @param string $taxonomy Attribute taxonomy name.
*
* @return void
*/
function wp_kama_woocommerce_attribute_deleted_action( $id, $name, $taxonomy ){
// action...
}
- $id(int)
- Attribute ID.
- $name(string)
- Attribute name.
- $taxonomy(string)
- Attribute taxonomy name.
Where the hook is called
woocommerce_attribute_deleted
woocommerce/includes/wc-attribute-functions.php 724
do_action( 'woocommerce_attribute_deleted', $id, $name, $taxonomy );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-post-data.php 77
add_action( 'woocommerce_attribute_deleted', array( __CLASS__, 'handle_global_attribute_updated' ), 10, 3 );
woocommerce/src/Internal/Caches/ProductVersionStringInvalidator.php 87
add_action( 'woocommerce_attribute_deleted', array( $this, 'handle_woocommerce_attribute_deleted' ), 10, 3 );