Repository navigation
fix(webhooks): resolve Plugin Check errors in the shipped plugin - #840
Open
josephfusco wants to merge 4 commits into
Open
josephfusco wants to merge 4 commits into
josephfusco wants to merge 4 commits into
Conversation
WordPress expects the text domain to match the plugin slug, wpgraphql-webhooks. The admin page slug and the REST namespace keep their graphql-webhooks names.
Plugin Check rejects "7.4+" and flags the mismatch with readme.txt, which says 7.4.
…ator comments - Escape wp_die() messages, the deleted-count notice, and GraphQL UserError messages, the same way WPGraphQL core does. - Add translators comments for the placeholder strings, and pluralize the header count.
|
Contributor
📦 Plugin Artifacts Ready!Download from GitHub Actions run Available plugins:
See the "Artifacts" section at the bottom of the Actions run page |
Contributor
🔍 WordPress Plugin Check Report
📊 Report
❌ Errors (21)📁 examples/webhooks-isr/wp-env/uploads.zip (1 error)
📁 .phpcs.xml.dist (2 errors)
📁 examples/webhooks-isr/wp-env/setup/.htaccess (1 error)
📁 .env.dist (2 errors)
📁 .editorconfig (1 error)
📁 .gitattributes (1 error)
📁 phpstan.neon.dist (1 error)
📁 bin/build-docker.sh (1 error)
📁 bin/_lib.sh (1 error)
📁 bin/sync-package-version.sh (1 error)
📁 bin/run-codeception.sh (1 error)
📁 bin/install-plugins.sh (1 error)
📁 bin/install-test-env.sh (1 error)
📁 examples/webhooks-isr/example-app/src/pages/[...uri].js (1 error)
📁 wpgraphql-webhooks.php (2 errors)
📁 readme.txt (2 errors)
📁 phpstan/constants.php (1 error)
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
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.
Brings Plugin Check on the wpgraphql-webhooks zip down from 150 errors to 3. The three left need maintainer decisions (below). One commit per fix:
graphql-webhooks→wpgraphql-webhooks(117 errors). WordPress expects the text domain to match the plugin slug. Changed in the header, theWPGRAPHQL_WEBHOOKS_TEXT_DOMAINconstant,load_plugin_textdomain(), every i18n call, and the phpcstext_domainsetting. There are no translation files, so nothing breaks. The admin page slug (page=graphql-webhooks) and the REST namespace (graphql-webhooks/v1) are separate identifiers and stay as they are, so existing admin links and REST clients keep working.Requires PHP: 7.4+→7.4, matchingreadme.txtandcomposer.json.ABSPATHguards inactivation.php,deactivation.php,src/Plugin.php, andsrc/Admin/WebhooksListTable.php.wp_die()messages (including a rawWP_Errormessage) and the "N webhooks deleted" noticeUserErrormessages inesc_html__(), as WPGraphQL core doestranslatorscomments to the placeholder strings_n(), so a single header doesn't read "1 headers"Needs a decision
BSD-0-Clausein the header (linking to BSD-3-Clause),GPL-3inreadme.txt, andGPL-2.0incomposer.json. There's noLICENSEfile. This PR leaves it unchanged.Testing
composer archiveand ranwp plugin check wpgraphql-webhookslocally in wp-env, using the same options as the workflow in ci: run Plugin Check on the built plugin archive #830. The only errors left are the two license errors and "Tested up to".php -lpasses on every changed file. The code-quality workflow runs the plugin's own phpcs and phpstan.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with running Plugin Check locally and fixing the errors it reported.