Skip to content
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

[Woo POS] Show POS Menu with WooCommerce Upgrade description When WooCommerce Version is Outdated #13807

Draft
wants to merge 13 commits into
base: trunk
Choose a base branch
from

Conversation

AnirudhBhat
Copy link
Contributor

Closes: #13497

Description

This PR updates the logic for displaying the POS menu option to ensure it is shown when POS meets all criteria except WooCommerce version. If WooPOS is unavailable for any other reason (e.g., site settings, currency, feature flag), the POS menu will remain hidden. This ensures merchants don't miss out on POS simply because they overlooked the version requirement.

Before this PR, we would hide the POS option if WooCommerce version was outdated.

After this PR, we display POS option with a description that says to upgrade WooCommerce version. When clicked, we display a simple toast that just asks merchants to update their WooCommerce version

Steps to reproduce

Store that meets all POS criteria but with WooCommerce version < 9.6.0

  1. Navigate to menu tab
  2. Ensure you see POS option with a description that says to update it
  3. Click on it
  4. Ensure you see a toast message asking to update WooCommerce version to access POS

Store that meets all POS criteria with WooCommerce version > 9.6.0

  1. Navigate to menu tab
  2. Ensure you see POS option
  3. Click on it
  4. Ensure the POS mode opens

The tests that have been performed

Tested above steps both on emulator and on real tablet device

Images/gif

pos_entry_point.mp4
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@AnirudhBhat AnirudhBhat added type: enhancement A request for an enhancement. feature: point of sale POS project labels Mar 19, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 19, 2025

1 Warning
⚠️ Class WooPosNotEligible is missing tests, but unit-tests-exemption label was set to ignore this.
2 Messages
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commite8812ee
Direct Downloadwoocommerce-wear-prototype-build-pr13807-e8812ee.apk

@AnirudhBhat AnirudhBhat added unit-tests-exemption category: tracks Related to analytics, including Tracks Events. labels Mar 19, 2025
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commite8812ee
Direct Downloadwoocommerce-prototype-build-pr13807-e8812ee.apk

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 81.44330% with 18 lines in your changes missing coverage. Please review.

Project coverage is 38.13%. Comparing base (66f3ff5) to head (e8812ee).
Report is 31 commits behind head on trunk.

Files with missing lines Patch % Lines
...ocommerce/android/ui/moremenu/MoreMenuViewModel.kt 80.59% 3 Missing and 10 partials ⚠️
...m/woocommerce/android/ui/woopos/WooPosIsEnabled.kt 78.26% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13807      +/-   ##
============================================
+ Coverage     38.10%   38.13%   +0.02%     
- Complexity     9207     9214       +7     
============================================
  Files          2070     2070              
  Lines        114100   114169      +69     
  Branches      14527    14539      +12     
============================================
+ Hits          43478    43535      +57     
- Misses        66673    66677       +4     
- Partials       3949     3957       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tracks Related to analytics, including Tracks Events. feature: point of sale POS project type: enhancement A request for an enhancement. unit-tests-exemption
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Woo POS] Show POS entry point for stores which can become eligible
4 participants