woocommerce_api_delete_order_note

woocommerce_api_delete_order_note

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_delete_order_note') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-orders.php line 1448
    1444
    1445
    1446
    1447
    1448
    1449
    1450
    1451
    1452
    1453
    1454
            if ( ! $result ) {
                throw new WC_API_Exception( 'woocommerce_api_cannot_delete_order_note', __( 'This order note cannot be deleted', 'woocommerce' ), 500 );
            }
     
            do_action( 'woocommerce_api_delete_order_note', $note->comment_ID, $order_id, $this );
     
            return array( 'message' => __( 'Permanently deleted order note', 'woocommerce' ) );
        } catch ( WC_API_Exception $e ) {
            return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
        }
    }
  • /includes/legacy/api/v3/class-wc-api-orders.php line 1493
    1489
    1490
    1491
    1492
    1493
    1494
    1495
    1496
    1497
    1498
    1499
            if ( ! $result ) {
                throw new WC_API_Exception( 'woocommerce_api_cannot_delete_order_note', __( 'This order note cannot be deleted', 'woocommerce' ), 500 );
            }
     
            do_action( 'woocommerce_api_delete_order_note', $note->comment_ID, $order_id, $this );
     
            return array( 'message' => __( 'Permanently deleted order note', 'woocommerce' ) );
        } catch ( WC_API_Exception $e ) {
            return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
        }
    }