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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

AnirudhBhat
Copy link
Contributor

@AnirudhBhat AnirudhBhat commented Nov 27, 2024

Please review the corresponding WooCommerce PR after reviewing and merging this one

This PR removes empty filter condition which was one among few conditions we were checking before removing stale products from the database before inserting new ones fetched from the remote.

This was done since for POS, when we fetch products, there always will be filter applied for products (simple + variable) unless we support all types of products in POS. Since from POS, we won't be having an empty filter, the stale products in the database weren't being removed.

@AnirudhBhat AnirudhBhat changed the title Remove empty filters condition from deleting stale products from database [Woo POS][non-simple products] Remove empty filters condition from deleting stale products from database Nov 27, 2024
@AnirudhBhat AnirudhBhat marked this pull request as ready for review November 28, 2024 03:36
@samiuelson samiuelson self-assigned this Nov 28, 2024
Copy link
Contributor

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

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

LGTM. I left one question.

@@ -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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants