-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Allow manual stock adjustment on order items #22012
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
includes/class-wc-ajax.php
Outdated
| $reduced = $order_item->get_meta( '_reduced_stock', true ); | ||
| if ( ! $reduced ) { | ||
| $reduced = $net_stock_change; | ||
| } elseif ( $net_stock_change <= $reduced ) { |
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.
Why so much whitespace?
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.
Thanks, I'm not sure why phpcs didn't catch that one.
|
Thanks for your work on reimplementing this feature. The admin UI part of everything looks good in my testing. I wasn't able to get the increase/reduce stock buttons to do anything, though. Looking at the code in this PR there doesn't seem to be anything hooked to the buttons that will call the ajax methods? Also requesting a review from @mikejolley since he will be back by the time 3.5.3 is released. |
This has been added. |
All Submissions:
Changes proposed in this Pull Request:
Closes #21754 .
How to test the changes in this Pull Request:
sass assets/css/admin.scss assets/css/admin.css.add_filter( 'woocommerce_order_allow_manual_stock_adjustment', '__return_true' );.Reduce StockandIncrease Stockbuttons should slide down.Reduce StockandIncrease Stockbuttons should slide up.CancelorSave.Reduce Stock.Other information:
Additional note/question for reviewer: In restoring the
tbody tr.selectedCSS, I did not restore the td pointer in https://github.com/woocommerce/woocommerce/blob/3.4.7/assets/css/admin.scss#L1454:L1456. If that should be restored as well, let me know.Changelog entry