Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #590
Description
Apply the woocommerce_order_fully_refunded_status filter to allow using
wc_refund_payment()
for voiding a transaction programmatically. The only issue that I see with doing so currently is that the order status gets changed which, in my case, I do not want.Steps to Test
Create 2 orders both using the Paypal gateway in authorize mode . Refund them by calling the following script:
Observe that
$order_1
is now in the refunded status whereas $order_2 remained in the status it was at in the beginning, but both authorizations were voided in Paypal.Changelog Entry