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.7.0

apply_filters('woocommerce_api_edit_order_refund_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-orders.php line 1689
    			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
    			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 ) ) {