-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[Rest] Refunds add api_restock param to restock items #30179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@jonathansadowski I have one question. Will this PR be included for the next release? Thanks. |
jonathansadowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fitimvata Thanks for your PR, I tested it and it's working well. When I don't provide the api_restock parameter, it defaults to true, and when I specify it as false, as expected, the line items that I refund are not restocked.
I just left a minor suggestion for the description within the schema — this is to better match the wording that's shown within the refund interface (and hopefully alleviate potential confusion).
includes/rest-api/Controllers/Version3/class-wc-rest-order-refunds-controller.php
Outdated
Show resolved
Hide resolved
It's too late to include this in WooCommerce 5.5. I'm going to add it to the 5.6 milestone, and let's target it for inclusion there. |
Can you make an exception we need this asap in our company. If it is not possible, do you have an ETA for 5.6? |
@fitimvata, unfortunately, we will not be able to make any exception. WooCommerce 5.6 is slated for final release on the 2nd Tuesday in August — August 10th, with Beta and Release Candidate currently slated for July 20th and July 27th respectively. Thanks for making the update requested, and for the initial PR. I'm going to merge this into trunk! |
|
Thank accepting this pr @jonathansadowski |
All Submissions:
Changes proposed in this Pull Request:
In rest endpoint for creating refunds
restock_itemswas hardcoded with valuetrue. With this changes, this parameter canbe changed by client directly. I opened this pull request because i have a use case when i need to refund order from rest api but not restock the items.
How to test the changes in this Pull Request:
api_restockparameter. Verify that the previous behavior (defaults totrue) remains, and that the stock is restored.api_restockparameter with afalsevalue. Verify that the stock is not restored.Other information:
Changelog entry