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][non-simple products] Remove empty filters condition from deleting stale products from database #3114

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1604,8 +1604,7 @@ class WCProductStore @Inject constructor(
if (forceRefresh &&
offset == 0 &&
includedProductIds.isEmpty() &&
excludedProductIds.isEmpty() &&
filterOptions.isEmpty()
excludedProductIds.isEmpty()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Does it affect the Product screen in store management?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and no.

Yes, because we have removed filterOptions.isEmpty() condition that was a requirement earlier before we deleted products.

No, because AFAIU, there will not be any behavioural changes in the products screen because of this. When we apply any filter on the products screen and pull to refresh, we delete and then upsert products now instead of just upserting product.

) {
productStorageHelper.deleteProductsForSite(site)
}
Expand Down