woocommerce_order_is_partially_refunded
Trigger notification emails.
Filter hook to modify the partially-refunded status conditions.
Usage
add_filter( 'woocommerce_order_is_partially_refunded', 'wp_kama_woocommerce_order_is_partially_refunded_filter', 10, 3 ); /** * Function for `woocommerce_order_is_partially_refunded` filter-hook. * * @param bool $is_partially_refunded Whether the order is partially refunded. * @param int $order_id The order id. * @param int $refund_id The refund id. * * @return bool */ function wp_kama_woocommerce_order_is_partially_refunded_filter( $is_partially_refunded, $order_id, $refund_id ){ // filter... return $is_partially_refunded; }
- $is_partially_refunded(true|false)
- Whether the order is partially refunded.
- $order_id(int)
- The order id.
- $refund_id(int)
- The refund id.
Changelog
Since 6.7.0 | Introduced. |
Where the hook is called
woocommerce_order_is_partially_refunded
woocommerce/includes/wc-order-functions.php 673
if ( (bool) apply_filters( 'woocommerce_order_is_partially_refunded', ( $remaining_refund_amount - $args['amount'] ) > 0 || ( $order->has_free_item() && ( $remaining_refund_items - $refund_item_count ) > 0 ), $order->get_id(), $refund->get_id() ) ) {