- 
                Notifications
    You must be signed in to change notification settings 
- Fork 134
Move Product and Variations sync action into a single class #14831
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
Move Product and Variations sync action into a single class #14831
Conversation
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.
Pull Request Overview
This PR consolidates the WooPosSyncProductsAction and WooPosSyncVariationsAction classes into a single file by introducing a new WooPosSyncAction wrapper class. The wrapper delegates to the existing actions, which have been moved from separate files into the same file.
- The WooPosSyncVariationsActionclass is moved from its own file intoWooPosSyncAction.kt
- A new WooPosSyncActionwrapper class is introduced to providesyncProducts()andsyncVariations()methods
- All references to the separate action classes are updated to use the new wrapper
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description | 
|---|---|
| WooPosLocalCatalogSyncRepositoryTest.kt | Updates test mocks and method calls to use the new WooPosSyncActionwrapper class | 
| WooPosSyncVariationsAction.kt | Deleted file - variations action moved to WooPosSyncAction.kt | 
| WooPosSyncAction.kt | Adds wrapper class and consolidates both products and variations actions into single file | 
| WooPosLocalCatalogSyncRepository.kt | Updates constructor and method calls to use the new wrapper class | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| maxPages = maxPages | ||
| ) | ||
| } | ||
|  | 
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.
📓 All the code within this file below this line was copy-pasted from the separate files.
| 📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
 | 
| 📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build. 
 | 
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!
Do not merge label - target branch needs to be trunk.
Description
This PR is just preparation for refactoring the WooPosSyncProductsAction and WooPosSyncVariationsAction into a single action. Since moving and refactoring the classes within a single PR could easily get out of hand and would be difficult to review, this PR simply moves the actions into a single file and a shared class.
Test Steps
No need to test anything - it's just a simple move.
Images/gif
N/A
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.