Repository navigation
Remove the Product sync tab and retire sync exclusions - #4118
Closed
vahidkay-meta wants to merge 1 commit into
Closed
vahidkay-meta wants to merge 1 commit into
vahidkay-meta wants to merge 1 commit into
Conversation
The Product sync tab has been hidden behind the woo_all_products_sync_enabled rollout switch since 3.5.3. Its woo_all_products_rollout gatekeeper passes Public at 100%; only its Opt Out (0%) and Positive Revenue With Sync Disabled (1%) groups still see the tab. Every other store already runs with the store-wide sync toggle and the category and tag exclusions ignored. Make that the behaviour for every store: - Remove the Product_Sync settings screen, its settings-sync.js, and the AJAX handlers only it used: sync status, the excluded-terms prompt and the bulk "Include in Facebook sync" prompt, which only warned about excluded terms. - Drop the store-wide sync and category/tag checks from ProductValidator, and the excluded-terms filter from the product list. - Retire the rollout switch. Products::get_product_sync_meta_key() now depends only on the master sync opt-out, so opted-out stores keep their per-product legacy flags exactly as before. - Deprecate is_product_sync_enabled(), is_woo_all_products_enabled(), get_excluded_product_category_ids(), get_excluded_product_tag_ids(), ProductValidator::passes_product_terms_check(), Products::product_should_be_deleted() and Products::is_sync_excluded_for_product_terms(). They keep working and return the values every switched-on store already got. The stored options stay. WC_Facebook_Product still reads them to tag products that only sync because exclusions were retired (is_woo_all_products_sync), and the plugin config report still sends them to Meta.
Contributor
📦 Latest Plugin BuildBuilt at: 2026-11-06T13:10:53Z Download: Click here to download the plugin To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact |
|
@vahidkay-meta has imported this pull request. If you are a Meta employee, you can view this in D130190364. |
|
@vahidkay-meta merged this pull request in f6126f1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Product sync tab has been hidden behind the
woo_all_products_sync_enabledrollout switch since 3.5.3 (#3364). Meta sets that switch per business from thewoo_all_products_rolloutgatekeeper:Over the last 7 days about 97.7% of gatekeeper checks passed. This PR gives every store the behaviour the Public group already has, and removes the tab and the code behind it.
This changes sync for the two cohorts above. Products they excluded by category or tag, and every product in a store that turned sync off store-wide, will start syncing. It needs sign-off from
catalog_integrations, who own the gatekeeper, before merging.What stays the same
The master sync opt-out (
wc_facebook_master_sync_opt_out_time) is untouched.Products::get_product_sync_meta_key()now depends only on it, so opted-out stores keep their per-product legacy flags exactly as they do today with the switch on.Per-product exclusion (the product checkbox and the Include/Exclude bulk actions) is unchanged.
The stored options (
wc_facebook_enable_product_sync,wc_facebook_excluded_product_category_ids,wc_facebook_excluded_product_tag_ids) are kept on purpose:WC_Facebook_Productreads them to tag products that only sync because exclusions were retired (is_woo_all_products_sync).For the same reason they are not added to
DEPRECATED_OPTIONS, which would delete them on disconnect.The language override setting still appears on the Configuration tab through
Localization_Settings_Trait.Removed
Product_Syncsettings screen andassets/js/admin/settings-sync.js.wc_facebook_get_sync_statusProductValidator, and the excluded-terms filter in the admin product list.SWITCH_WOO_ALL_PRODUCTS_SYNC_ENABLEDrollout switch.Deprecated
Following the pattern in #4045, these keep working, return the values every switched-on store already gets, and emit
wc_deprecated_function():is_product_sync_enabled()returnstrueis_woo_all_products_enabled()returnstrueget_excluded_product_category_ids()andget_excluded_product_tag_ids()return[]ProductValidator::passes_product_terms_check()returnstrueProducts::product_should_be_deleted()returnsfalseProducts::is_sync_excluded_for_product_terms()returnsfalseNo internal callers remain.
product_should_be_deleted()only ever checked category/tag exclusions, despite its docblock mentioning out-of-stock products, so its four callers now just sync.To be reviewed
Things found while making this change that need a reviewer's call:
woo_all_products_rolloutstill see the tab today, and their exclusions and store-wide sync toggle still apply. After this PR, products they excluded start syncing.catalog_integrationsshould confirm before merging, and ideally move both groups to 100% first so the plugin and the gatekeeper agree.wc_facebook_enable_product_sync,wc_facebook_excluded_product_category_idsandwc_facebook_excluded_product_tag_idsare still read byWC_Facebook_Productto tag products that only sync because exclusions were retired (is_woo_all_products_sync), and the plugin config report still sends them to Meta. They are not added toDEPRECATED_OPTIONS, because that would delete them on disconnect and in the planned cleanup of connected stores. Confirm Meta still uses these, or say when they can go._wc_facebook_sync_enabled).get_product_sync_meta_key()now depends only on that opt-out. Confirm this is the intended end state for opted-out stores.handle_set_product_sync_bulk_action_prompt()sent no JSON response, whichproducts-admin.jsappears to treat as a failure and open an empty modal. This is from reading the code, not reproduced. The prompt is removed, so the bulk action now applies directly.plugin_updated_bannernow shows to the two cohorts. It tells them all products sync automatically and how to un-sync individual products. Check that copy is right for them.Type of change
Checklist
Changelog entry
Break - Remove the Product sync tab: all products now sync unless excluded individually, and category, tag and store-wide sync exclusions no longer apply.
Test Plan
Automated
get_product_sync_meta_key()returns the all-products key without an opt-out (even if Meta still sends the old switch asno) and the legacy key after an opt-out.tab=product_syncbookmark falls back to Shops.product_should_be_deleted()is deprecated and false.php -landnode --checkon every changed file. phpcs reports no new warnings on changed production files.Manual
woo_all_products_sync_enabled = no, with a category saved as excluded: confirm there is no Product sync tab, an old?tab=product_synclink opens Shops, and a product in the excluded category syncs.