woocommerce_attribute_deleted

woocommerce_attribute_deleted

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_attribute_deleted') is found 3 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 2169
    					wp_delete_term( $term->term_id, $taxonomy );
    				}
    			}
    
    			do_action( 'woocommerce_attribute_deleted', $id, $attribute_name, $taxonomy );
    			do_action( 'woocommerce_api_delete_product_attribute', $id, $this );
    
    			// Clear transients
    			delete_transient( 'wc_attribute_taxonomies' );
    			WC_Cache_Helper::invalidate_cache_group( 'woocommerce-attributes' );
    
    
  • /includes/legacy/api/v3/class-wc-api-products.php line 2724
    					wp_delete_term( $term->term_id, $taxonomy );
    				}
    			}
    
    			do_action( 'woocommerce_attribute_deleted', $id, $attribute_name, $taxonomy );
    			do_action( 'woocommerce_api_delete_product_attribute', $id, $this );
    
    			// Clear transients.
    			wp_schedule_single_event( time(), 'woocommerce_flush_rewrite_rules' );
    			delete_transient( 'wc_attribute_taxonomies' );
    			WC_Cache_Helper::invalidate_cache_group( 'woocommerce-attributes' );
    
  • /includes/wc-attribute-functions.php line 701
    		 * @param int    $id       Attribute ID.
    		 * @param string $name     Attribute name.
    		 * @param string $taxonomy Attribute taxonomy name.
    		 */
    		do_action( 'woocommerce_attribute_deleted', $id, $name, $taxonomy );
    		wp_schedule_single_event( time(), 'woocommerce_flush_rewrite_rules' );
    		delete_transient( 'wc_attribute_taxonomies' );
    		WC_Cache_Helper::invalidate_cache_group( 'woocommerce-attributes' );
    
    		return true;
    	}
    

See this hook used in plugins: