woocommerce_api_edit_order_refund_data

woocommerce_api_edit_order_refund_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_edit_order_refund_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-orders.php line 1689
    1685
    1686
    1687
    1688
    1689
    1690
    1691
    1692
    1693
    1694
    1695
    if ( $refund->post_parent != $order_id ) {
        throw new WC_API_Exception( 'woocommerce_api_invalid_order_refund_id', __( 'The order refund ID provided is not associated with the order.', 'woocommerce' ), 400 );
    }
     
    $data = apply_filters( 'woocommerce_api_edit_order_refund_data', $data, $refund->ID, $order_id, $this );
     
    // Update reason
    if ( isset( $data['reason'] ) ) {
        $updated_refund = wp_update_post( array( 'ID' => $refund->ID, 'post_excerpt' => $data['reason'] ) );
     
        if ( is_wp_error( $updated_refund ) ) {
  • /includes/legacy/api/v3/class-wc-api-orders.php line 1734
    1730
    1731
    1732
    1733
    1734
    1735
    1736
    1737
    1738
    1739
    1740
    if ( $refund->post_parent != $order_id ) {
        throw new WC_API_Exception( 'woocommerce_api_invalid_order_refund_id', __( 'The order refund ID provided is not associated with the order.', 'woocommerce' ), 400 );
    }
     
    $data = apply_filters( 'woocommerce_api_edit_order_refund_data', $data, $refund->ID, $order_id, $this );
     
    // Update reason
    if ( isset( $data['reason'] ) ) {
        $updated_refund = wp_update_post( array( 'ID' => $refund->ID, 'post_excerpt' => $data['reason'] ) );
     
        if ( is_wp_error( $updated_refund ) ) {