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
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    }
     
    $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
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    }
     
    $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 );