Introduce woocommerce_order_full_refunded_status filter

In certain situations it’s undesirable to automatically change the
order status for an order that has been fully refunded. For example, an
order processed with a credit card whose charge has been authorized but
not yet captured is typically voided, not refunded since no funds have
actually been transferred. In that case, it’s ideal to allow gateways
to change the status to cancelled instead.
This commit is contained in:
Max Rice 2015-07-10 19:51:02 -04:00
parent ee1263db9c
commit a9f6f7fdfe
1 changed files with 1 additions and 1 deletions

View File

@ -2211,7 +2211,7 @@ class WC_AJAX {
}
if ( $refund_amount == $max_refund ) {
$order->update_status( 'refunded' );
$order->update_status( apply_filters( 'woocommerce_order_fully_refunded_status', 'refunded', $order_id, $refund->id ) );
$response_data['status'] = 'fully_refunded';
}