woocommerce_api_delete_product

woocommerce_api_delete_product

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_delete_product') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 425
    		}
    
    		$product = wc_get_product( $id );
    
    		do_action( 'woocommerce_api_delete_product', $id, $this );
    
    		// If we're forcing, then delete permanently.
    		if ( $force ) {
    			if ( $product->is_type( 'variable' ) ) {
    				foreach ( $product->get_children() as $child_id ) {
    					$child = wc_get_product( $child_id );
    
  • /includes/legacy/api/v3/class-wc-api-products.php line 484
    		}
    
    		$product = wc_get_product( $id );
    
    		do_action( 'woocommerce_api_delete_product', $id, $this );
    
    		// If we're forcing, then delete permanently.
    		if ( $force ) {
    			if ( $product->is_type( 'variable' ) ) {
    				foreach ( $product->get_children() as $child_id ) {
    					$child = wc_get_product( $child_id );