Prepare for WordPress 7.0 and improve plugin robustness#10
Open
wzul wants to merge 1 commit into
Open
Conversation
Changes: - Bump Tested up to 7.0 in readme.txt - Fix rgar() argument order in complete_payment() that broke delayed feeds - Fix API singleton to key instances by credentials hash, preventing cross-contamination when global and form configs use different keys - Add WP_Error and HTTP status code checking in API client request() - Extract repeated credential resolution into get_credentials_for_feed() helper - Sync package.json version with plugin version - Update PHPCS testVersion to 7.4-8.4 - Add unit tests for GF_Chip core logic (credentials, callback actions, timezone) - Add GF framework stubs in bootstrap.php so GF_Chip can be unit tested - Add CLAUDE.md with project context and notes - Add CLAUDE.md to .gitattributes export-ignore Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
This PR prepares the plugin for WordPress 7.0 release and fixes critical bugs found during code review.
Critical Fixes
readme.txtrgar()argument order incomplete_payment()— arguments were swapped (rgar('transaction_id', $action)instead ofrgar($action, 'transaction_id')), which broke delayed feed triggering after payment completionGF_CHIP_API::get_instance()previously returned the first-created instance regardless of credentials. Now instances are keyed bymd5(secret_key + brand_id), preventing credential cross-contamination when a site uses both Global and Form Configuration with different keysImprovements
request()methodget_credentials_for_feed()helper (DRY refactor across 5 methods)1.2.0)7.4-to7.4-8.4to match CI matrixGF_Chipcore logic (credentials resolution, callback action building, timezone)tests/bootstrap.phpsoGF_Chipcan be unit tested without the full Gravity Forms pluginTest Plan
./vendor/bin/phpunitlocally./scripts/run-plugin-check.sh🤖 Generated with Claude Code