-
Notifications
You must be signed in to change notification settings - Fork 136
[Scan to Update Inventory] Hide Scan Barcode Menu Item if store has Woo Square Plugin Active #10279
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
[Scan to Update Inventory] Hide Scan Barcode Menu Item if store has Woo Square Plugin Active #10279
Conversation
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## trunk #10279 +/- ##
============================================
- Coverage 41.74% 41.74% -0.01%
Complexity 4885 4885
============================================
Files 993 993
Lines 55873 55879 +6
Branches 7410 7411 +1
============================================
+ Hits 23322 23324 +2
- Misses 30487 30491 +4
Partials 2064 2064 ☔ View full report in Codecov by Sentry. |
| scanBarcodeMenuItem?.let { menuItem -> | ||
| if (showScan) menuItem.isVisible else menuItem.isVisible = false | ||
| } |
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.
| scanBarcodeMenuItem?.let { menuItem -> | |
| if (showScan) menuItem.isVisible else menuItem.isVisible = false | |
| } | |
| scanBarcodeMenuItem?.isVisible = !productListViewModel.isSquarePluginActive() |
💡 Could we simplify the code like that?
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.
absolutely. Done here 3b4a772
samiuelson
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.
LGTM
Just added small improvement idea
71e7291 to
3b4a772
Compare
NOTE: This FluxC PR needs to be reviewed and merged first
Closes: #10266
Description
context: pdfdoF-47p-p2#comment-5261
This PR adds the logic to hide the Scan Barcode icon from the products list if the Woo Square plugin is active.
Testing instructions
Images/gif
RELEASE-NOTES.txtif necessary.