woocommerce_api_create_product

woocommerce_api_create_product

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_create_product') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 293
    			if ( isset( $data['type'] ) && 'variable' == $data['type'] && isset( $data['variations'] ) && is_array( $data['variations'] ) ) {
    				$this->save_variations( $product, $data );
    			}
    
    			do_action( 'woocommerce_api_create_product', $id, $data );
    
    			// Clear cache/transients
    			wc_delete_product_transients( $id );
    
    			$this->server->send_status( 201 );
    
    
  • /includes/legacy/api/v3/class-wc-api-products.php line 347
    			if ( isset( $data['type'] ) && 'variable' == $data['type'] && isset( $data['variations'] ) && is_array( $data['variations'] ) ) {
    				$this->save_variations( $product, $data );
    			}
    
    			do_action( 'woocommerce_api_create_product', $id, $data );
    
    			// Clear cache/transients.
    			wc_delete_product_transients( $id );
    
    			$this->server->send_status( 201 );