Add docblock

This commit is contained in:
“Chris 2022-05-19 17:41:09 +03:00
parent dcdc32b7af
commit d569cf463a
1 changed files with 11 additions and 1 deletions

View File

@ -609,7 +609,17 @@ function wc_create_refund( $args = array() ) {
wc_restock_refunded_items( $order, $args['line_items'] );
}
// Trigger notification emails.
/**
* Trigger notification emails.
*
* Filter hook to modify the partially-refunded status conditions.
*
* @since 6.6.0
*
* @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.
*/
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() ) ) {
do_action( 'woocommerce_order_partially_refunded', $order->get_id(), $refund->get_id() );
} else {