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/2370 fb sync status is incorrect for catalog visibility hidden #2403

Conversation

rawdreeg
Copy link
Contributor

@rawdreeg rawdreeg commented Nov 30, 2022

Changes proposed in this Pull Request:

When a product's catalog visibility is set to hidden, the Facebook Sync status is incorrect in the Products list admin and edit. The product is not synced in Facebook. This is because the sync_enabled variable would not take into account product_should_sync status in order to determined the dropdown value.

Making this change also meant adding provision for catalog visibility being restored. I added a helper method in the ProductValidator class to check whether is product is valid without checking the sync field, as this would still contain old meta data.

Closes #2370.

Replace this with a good description of your changes & reasoning.

  • 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. Create a product with catalog visibility hidden.
  2. Check the status of Facebook Sync in Products in the admin panel. It shows "Do not sync."
  3. Check the status of Facebook Sync in the Products Edit screen. It shows "Do not sync."
  4. Set this catalog visibility back to show and check that the Facebook Sync is restored to "Sync and Show."

Changelog entry

Fix - Facebook Sync status is incorrect when a product has catalog visibility hidden

@rawdreeg rawdreeg requested a review from a team November 30, 2022 13:11
@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 Nov 30, 2022
Copy link
Contributor

@ibndawood ibndawood left a comment

Choose a reason for hiding this comment

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

Thank you @rawdreeg for your changes. I have added some questions please review them.

facebook-commerce.php Outdated Show resolved Hide resolved
includes/Admin.php Outdated Show resolved Hide resolved
@rawdreeg rawdreeg requested a review from ibndawood December 1, 2022 09:49
@rawdreeg
Copy link
Contributor Author

rawdreeg commented Dec 1, 2022

Thanks for the feedback. This is ready for another round of reviews.

includes/Admin.php Outdated Show resolved Hide resolved
Copy link
Contributor

@ibndawood ibndawood left a comment

Choose a reason for hiding this comment

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

Thank you @rawdreeg for the changes. The changes look good. I generated the build and tested the instructions in #2370. The issue resolved with the new build.

rawdreeg and others added 2 commits December 1, 2022 17:59
Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>
@rawdreeg rawdreeg merged commit 79fa971 into develop Dec 1, 2022
@rawdreeg rawdreeg deleted the fix/2370-fb_sync_status_is_incorrect_for_catalog_visibility_hidden branch December 1, 2022 16:03
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.

Facebook Sync status is incorrect when a product has catalog visibility hidden
2 participants