woocommerce_api_edit_order_refund_data
The WooCommerce woocommerce api edit order refund data hook.
Description
apply_filters( 'woocommerce_api_edit_order_refund_data', (unknown) $data, (unknown) $refund_id, (unknown) $order_id, (unknown) $instance );
Parameters (4)
- 0. $data (unknown)
- The data.
- 1. $refund_id (unknown)
- The refund id.
- 2. $order_id (unknown)
- The order id.
- 3. $instance (unknown)
- The instance.
Usage
- To run the hook, copy the example below.
- $data = apply_filters( 'woocommerce_api_edit_order_refund_data', $data, $refund_id, $order_id, $instance );
- if ( !empty( $data ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the woocommerce_api_edit_order_refund_data callback
- function filter_woocommerce_api_edit_order_refund_data( $data, $refund_id, $order_id, $instance ) {
- // make filter magic happen here...
- return $data;
- };
- // add the filter
- add_filter( 'woocommerce_api_edit_order_refund_data', 'filter_woocommerce_api_edit_order_refund_data', 10, 4 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'woocommerce_api_edit_order_refund_data', 'filter_woocommerce_api_edit_order_refund_data', 10, 4 );
Defined (2)
The filter is defined in the following location(s).
- /includes/api/legacy/v3/class-wc-api-orders.php
- $data = apply_filters( 'woocommerce_api_edit_order_refund_data', $data, $refund->ID, $order_id, $this );
- /includes/api/legacy/v2/class-wc-api-orders.php
- $data = apply_filters( 'woocommerce_api_edit_order_refund_data', $data, $refund->ID, $order_id, $this );