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
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    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
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    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 );