woocommerce_before_attribute_delete, $id, $name, $taxonomy
woocommerce_before_attribute_delete, $id, $name, $taxonomy
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('woocommerce_before_attribute_delete, $id, $name, $taxonomy') is found 1 times:
- /includes/wc-attribute-functions.php line 761
* @param int $id Attribute ID. * @param string $name Attribute name. * @param string $taxonomy Attribute taxonomy name. */ do_action( 'woocommerce_before_attribute_delete', $id, $name, $taxonomy ); if ( $name && $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_attribute_taxonomies WHERE attribute_id = %d", $id ) ) ) { if ( taxonomy_exists( $taxonomy ) ) { $terms = get_terms( $taxonomy, 'orderby=name&hide_empty=0' ); foreach ( $terms as $term ) { wp_delete_term( $term->term_id, $taxonomy );