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

Fix - Out of stock stock products in WooCommerce remain listed on Facebook #2278

Conversation

rawdreeg
Copy link
Contributor

Changes proposed in this Pull Request:

If a user has checked the "Hide out of stock items from the catalog" option in WooCommerce (WooCommerce -> settings -> Products -> inventory), out-of-stock variable products are not deleted from Facebook. This PR fixes the logic to ensure the FB product is removed.

Closes #2277.

  • [ x] Do the changed files pass phpcs checks? Please remove phpcs:ignore comments in changed files and fix any issues, or delete if not practical.

Detailed test instructions:

  1. Make sure the "Hide out of stock items from the catalog" option in WooCommerce (WooCommerce -> settings -> Products -> inventory) is checked
  2. Edit a simple product and set the stock quantity to 0.
  3. The product should be removed from the FB catalog.
  4. Repeat steps 2 and 3 with a variable product and observe that the product is removed from the catalog

Changelog entry

Fix - Remove out-of-stock products on Facebook when the "Hide out of stock items from the catalog" option in WooCommerce is checked.

@rawdreeg rawdreeg self-assigned this Aug 23, 2022
@rawdreeg rawdreeg requested a review from a team August 23, 2022 14:22
@github-actions github-actions bot added changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug. labels Aug 23, 2022
Copy link
Contributor

@message-dimke message-dimke left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @rawdreeg

@rawdreeg rawdreeg merged commit 0af3714 into develop Aug 26, 2022
@rawdreeg rawdreeg deleted the fix/2277-remove-out-of-stock-stock-variable-product-on-facebook branch August 26, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product Sync - Out of stock stock products in WooCommerce remain listed on Facebook
2 participants