woocommerce_before_attribute_delete
Before deleting an attribute.
Использование
add_action( 'woocommerce_before_attribute_delete', 'wp_kama_woocommerce_before_attribute_delete_action', 10, 3 ); /** * Function for `woocommerce_before_attribute_delete` action-hook. * * @param int $id Attribute ID. * @param string $name Attribute name. * @param string $taxonomy Attribute taxonomy name. * * @return void */ function wp_kama_woocommerce_before_attribute_delete_action( $id, $name, $taxonomy ){ // action... }
- $id(int)
- Attribute ID.
- $name(строка)
- Attribute name.
- $taxonomy(строка)
- Attribute taxonomy name.
Где вызывается хук
woocommerce_before_attribute_delete
woocommerce/includes/wc-attribute-functions.php 694
do_action( 'woocommerce_before_attribute_delete', $id, $name, $taxonomy );