Skip to content

Remove the Product sync tab and retire sync exclusions - #4118

Closed
vahidkay-meta wants to merge 1 commit into
mainfrom
cleanup/remove-product-sync-tab
Closed

vahidkay-meta wants to merge 1 commit into
mainfrom
cleanup/remove-product-sync-tab

Conversation

@vahidkay-meta

@vahidkay-meta vahidkay-meta commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

The Product sync tab has been hidden behind the woo_all_products_sync_enabled rollout switch since 3.5.3 (#3364). Meta sets that switch per business from the woo_all_products_rollout gatekeeper:

Gatekeeper group Pass rate What the store sees today
Public 100% No tab. Store-wide sync toggle and category/tag exclusions ignored.
Cohort 4 [Positive Revenue With Sync Disabled] 1% Tab, with exclusions and the sync toggle still applied
Cohort 5 [Opt Out] 0% Tab, with exclusions and the sync toggle still applied

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_Product reads them to tag products that only sync because exclusions were retired (is_woo_all_products_sync).
    • The plugin config report still sends them to Meta.

    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

  • The Product_Sync settings screen and assets/js/admin/settings-sync.js.
  • The AJAX handlers only that screen used:
    • wc_facebook_get_sync_status
    • the excluded-terms prompt
    • the bulk "Include in Facebook sync" prompt. It only warned about excluded terms. For products not in an excluded term it sent no JSON response, which the script appears to treat as a failure and open an empty modal (observed in the code, not reproduced).
  • The store-wide sync and category/tag checks in ProductValidator, and the excluded-terms filter in the admin product list.
  • The SWITCH_WOO_ALL_PRODUCTS_SYNC_ENABLED rollout switch.
  • From the UI only, because they lived on the removed tab: Default Google product category and the Catalog link. The saved default category is still used. Switched-on stores already cannot reach either.

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() returns true
  • is_woo_all_products_enabled() returns true
  • get_excluded_product_category_ids() and get_excluded_product_tag_ids() return []
  • ProductValidator::passes_product_terms_check() returns true
  • Products::product_should_be_deleted() returns false
  • Products::is_sync_excluded_for_product_terms() returns false

No 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:

  1. Sign-off for the two cohorts still on the tab. Cohort 5 [Opt Out] (0%) and Cohort 4 [Positive Revenue With Sync Disabled] (1%) of woo_all_products_rollout still see the tab today, and their exclusions and store-wide sync toggle still apply. After this PR, products they excluded start syncing. catalog_integrations should confirm before merging, and ideally move both groups to 100% first so the plugin and the gatekeeper agree.
  2. Stored options are kept on purpose. wc_facebook_enable_product_sync, wc_facebook_excluded_product_category_ids and wc_facebook_excluded_product_tag_ids are still read by WC_Facebook_Product 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. They are not added to DEPRECATED_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.
  3. The master sync opt-out is unchanged. Stores that opted out through the plugin banner keep their per-product legacy sync flags (_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.
  4. The bulk "Include in Facebook sync" prompt looked broken. For products not in an excluded term, handle_set_product_sync_bulk_action_prompt() sent no JSON response, which products-admin.js appears 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.
  5. Two settings lose their screen. Default Google product category and the Catalog link were only on this tab. The saved default category still applies, but no screen can change it. Switched-on stores already cannot reach either. Decide whether they should move to another tab.
  6. plugin_updated_banner now 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

  • Break (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have commented my code, particularly in hard-to-understand areas, if any.
  • I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
  • I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors.
  • I followed general Pull Request best practices.
  • I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
  • I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
  • I have updated or requested update to plugin documentations (if necessary).

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

  • Unit
    • Each deprecated integration method emits its notice and returns the fixed value even with the old option or filter set.
    • get_product_sync_meta_key() returns the all-products key without an opt-out (even if Meta still sends the old switch as no) and the legacy key after an opt-out.
    • The settings menu shows Shops, Product Attributes and Configuration to connected stores, and an old tab=product_sync bookmark falls back to Shops.
  • Integration
    • The base test case no longer forces the switch off.
    • Validator tests now check that a stored "sync off", a saved category exclusion and a saved tag exclusion no longer stop a product from syncing, and that product_should_be_deleted() is deprecated and false.
    • The exclusion-only feed and data-preparation tests are removed.
  • E2E: the sync-in-progress tests use the Configuration tab's Sync products button instead of forcing the switch off to reach the removed tab.
  • Local checks: php -l and node --check on every changed file. phpcs reports no new warnings on changed production files.
  • Not run locally: PHPUnit, integration and E2E suites. This PR relies on CI for those.

Manual

  1. On a store where Meta returns woo_all_products_sync_enabled = no, with a category saved as excluded: confirm there is no Product sync tab, an old ?tab=product_sync link opens Shops, and a product in the excluded category syncs.
  2. On a store that opted out of syncing all products: confirm products excluded per-product stay excluded.
  3. On the product list, run "Include in Facebook sync" in bulk: the action applies without a modal.

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.
@vahidkay-meta vahidkay-meta added the changelog: breaking A change breaking previous API or functionality. label Nov 6, 2026
@meta-cla meta-cla Bot added the CLA Signed label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

📦 Latest Plugin Build

Built at: 2026-11-06T13:10:53Z
Commit: d383c5d
Size: 1.9M

Download: Click here to download the plugin

To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact

@meta-codesync

meta-codesync Bot commented Nov 6, 2026

Copy link
Copy Markdown

@vahidkay-meta has imported this pull request. If you are a Meta employee, you can view this in D130190364.

@meta-codesync meta-codesync Bot closed this in f6126f1 Nov 9, 2026
@meta-codesync meta-codesync Bot added the Merged label Nov 9, 2026
@meta-codesync

meta-codesync Bot commented Nov 9, 2026

Copy link
Copy Markdown

@vahidkay-meta merged this pull request in f6126f1.

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

Labels

changelog: breaking A change breaking previous API or functionality. CLA Signed Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant