Repository navigation
Remove unused /me, page and permissions API wrappers - #4092
Open
jczhuoMeta wants to merge 1 commit into
Open
jczhuoMeta wants to merge 1 commit into
jczhuoMeta wants to merge 1 commit into
Conversation
Contributor
📦 Latest Plugin BuildBuilt at: 2026-11-05T10:26:09Z Download: Click here to download the plugin To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact |
|
@jczhuoMeta has imported this pull request. If you are a Meta employee, you can view this in D125260127. |
Delete API::get_user() (GET /me), API::get_page() and the never-wired User\Permissions\Delete request/response. Nothing outside tests calls them. Stop sending page_id, ad_account_id, business_manager_id and profiles to /settings/finalize-install and drop them from its schema; the handler never reads them. Option constants and disconnect cleanup are untouched.
vahidkay-meta
force-pushed
the
cleanup/remove-unused-me-page-permissions-wrappers
branch
from
November 5, 2026 10:25
1a1930d to
8eb5ba7
Compare
This branch has not been deployed
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
Removes Graph API wrappers that nothing calls, so that no plugin code path depends on an endpoint needing
ads_managementor apages_*scope. This supports moving the Commerce Extension to least-privilege token scopes.API::get_user()(GET /me) andAPI::get_page()(GET /{page_id}?fields=name,link), along withAPI\User\{Request,Response}andAPI\Pages\Read\{Request,Response}. Only tests called them.API\User\Permissions\Delete\{Request,Response}(DELETE /{user_id}/permissions/{perm}). These were never wired intoAPIand have no callers.page_id,ad_account_id,business_manager_idandprofilesto/settings/finalize-install, and drop them from its schema.Handler::handle_finalize_install()never reads them: it persists only the token, CMS, CPI, catalog and pixel. A cached admin page that still sends them is harmless, because the fields were optional and never read.The
/me/accountspage access token read was already removed in 3.7.7. This removes what remained. There is no runtime behaviour change.Type of change
Checklist
includes/API/Plugin/README.mdno longer showspage_idin the finalize-install example.Changelog entry
Remove unused /me, page and permissions Graph API wrappers and unread finalize-install fields.
Test Plan
tests/Unit/ApiTest.php: 29 tests pass.unitandintegrationsuites: each test that fails or errors on this branch also fails or errors on unmodifiedmainin the same local environment, mostly PHP 8.5setAccessible()deprecations and a null connection handler. This change adds no new failures.git grepfinds no remaining references to the removed classes or methods.