The official plugin from Meta. This repository is now officially maintained by Meta's engineering team. We welcome and encourage contributions from the community.
by facebookLast 12 weeks ยท 60 commits
5 of 6 standards met
Context: There is currently a ~3x gap between CAPI and browser pixel Search event counts. The root cause is that when a user performs a product search, the Search CAPI event was sent twice: once in send_search_event() and again in actually_inject_search_event(), but the browser pixel only fired once. This resulted in 2 CAPI events per 1 pixel. Note that the gap is large and we should prioritize closing. For results page loads with multiple products, previously, the Search event flow fired CAPI twice on the same page: template_redirect โ send_search_event() โ CAPI (1st) woocommerce_before_shop_loop โ actually_inject_search_event() โ CAPI (2nd, duplicate) + Pixel. For single-result search (only 1 product matches โ WooCommerce redirects to the product page), previously, CAPI fired once on the search page and again on the product page: Search page: template_redirect โ send_search_event() โ CAPI (1st) Product page: maybe_inject_search_event() โ actually_inject_search_event() โ CAPI (2nd, duplicate) + Pixel Fix: Remove send_api_event() from actually_inject_search_event() so it only handles the browser pixel. CAPI is already handled by send_search_event(). Checklist [x] I have commented my code, particularly in hard-to-understand areas, if any. [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. [x] I followed general Pull Request best practices. Meta employees to follow this wiki). [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this wiki). Test Plan Previously, both multi-result and single-result searches fired 2 CAPI events per 1 pixel event. After this fix, each search fires 1 CAPI + 1 pixel. Note that for no results search, no Search events should fire.
Description PR #3856 introduced a matrix that runs E2E tests against both "Latest" and "Currently supported" (pinned) WP/WC versions. The WordPress up-to-date check fails on the pinned version because a newer patch release exists, causing WordPress to report an update is available. Pass IS_LATEST_WP env var from the workflow matrix and only assert WordPress is the latest version when running the "Latest" matrix. The WooCommerce version check remains enforced for both matrices. Type of change Fix (non-breaking change which fixes an issue) Checklist [x] I have commented my code, particularly in hard-to-understand areas, if any. [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. [x] I followed general Pull Request best practices. Meta employees to follow this wiki). [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this wiki). Changelog entry Fix E2E WordPress version check failing on pinned WP versions Test Plan Run e2e tests
Repository: facebook/facebook-for-woocommerce. Description: The official plugin from Meta. This repository is now officially maintained by Meta's engineering team. We welcome and encourage contributions from the community. Stars: 252, Forks: 183. Primary language: PHP. Languages: PHP (89.4%), JavaScript (9.6%), CSS (0.8%), Shell (0.3%). License: GPL-2.0. Homepage: https://wordpress.org/plugins/facebook-for-woocommerce/ Latest release: v3.5.17 (1w ago). Open PRs: 100, open issues: 126. Last activity: 1d ago. Community health: 87%. Top contributors: rawdreeg, budzanowski, ibndawood, danielbitzer, message-dimke, layoutd, vinkmeta, mengyingdu, sol-loup, vahidkay-meta and others.
PHP
Fix - Fix/collection page batch2 by @vahidkay-meta in #3863 Dev - Dev - break down e2e tests and automate supported version bumpup by @vahidkay-meta in #3856 Fix - Fix Google Product Category dropdowns not rendering on product pages by @rafael-curran in #3866 Add - [Rebranding]Update all references of Facebook for WooCommerce to Meta for WooCommerce by @sharunaanandraj in #3865
Description The method in API.php has been dead code since Aug 2022 when the SkyVerge framework was removed. This re-wires it into the request lifecycle via Base.php::handle_response(), restoring detection of invalid/expired tokens (error code 190, subcodes 452/458/460/464/465). When a token error is detected, a transient is set, an admin notice prompts the merchant to reconnect, and the settings page falls back to the onboarding splash iframe. On successful reconnection the transient is cleared and normal operation resumes. Also fixes a pre-existing jQuery noConflict issue in AdminNoticeHandler and adds 16 unit tests covering the full lifecycle. Note: This doesn't disable the integration, once detected. Calls continue to be attempted, in the event that there is a back-end validation of the user session which enables the integration. It only resets the splash page to the onboarding iframe. Type of change Add (non-breaking change which adds functionality) Checklist [x] I have commented my code, particularly in hard-to-understand areas, if any. [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. [x] I followed general Pull Request best practices. Meta employees to follow this wiki). [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this wiki). Changelog entry Added OAuth Error Detection and prompt to reconnect to Meta. Test Plan Screenshots Before No indication of broken connection even if 100% of graph API calls return OAuth errors. After