Mod. Integration. Opting out of force alt cookies for UserRegistrationPro members#801
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #801 +/- ##
============================================
+ Coverage 25.87% 25.94% +0.06%
- Complexity 5602 5608 +6
============================================
Files 264 264
Lines 24116 24109 -7
============================================
+ Hits 6241 6255 +14
+ Misses 17875 17854 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the CleanTalk integration for the User Registration & Membership (UserRegistrationPro) plugin to avoid forcing alternative cookies, while ensuring required request data is still captured for spam checks.
Changes:
- Updated
UserRegistrationProintegration to decodeform_data, extractuser_email/user_login, and build the spam-check payload viact_gfa_dto(...). - Adjusted frontend JS to stop forcing alt cookies for UserRegistrationPro forms and to recognize/inject CleanTalk data for the
action=user_registration_user_form_submitAJAX request. - Added PHPUnit coverage for
UserRegistrationPro::getDataForChecking()across multipleform_datashapes (JSON, escaped JSON, arrays, invalid input).
Reviewed changes
Copilot reviewed 12 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Antispam/IntegrationsByHook/TestUserRegistrationPro.php | Adds unit tests for UserRegistrationPro data extraction/decoding behavior. |
| lib/Cleantalk/Antispam/Integrations/UserRegistrationPro.php | Switches to ct_gfa_dto(...) and parses form_data for email/nickname. |
| inc/cleantalk-ajax.php | Removes a plugin-specific blocked-response format for user_registration_user_form_submit. |
| js/src/public-1-main.js | Stops forcing alt cookies for URP forms; adds AJAX signature handling for user_registration_user_form_submit. |
| js/prebuild/apbct-public-bundle.js | Prebuilt bundle updated to reflect JS source changes (includes new AJAX sign logic). |
| js/prebuild/apbct-public-bundle_gathering.js | Prebuilt “gathering” variant updated with the same JS behavior. |
| js/prebuild/apbct-public-bundle_int-protection.js | Prebuilt “int-protection” variant updated with the same JS behavior. |
| js/prebuild/apbct-public-bundle_int-protection_gathering.js | Prebuilt “int-protection + gathering” variant updated with the same JS behavior. |
| js/prebuild/apbct-public-bundle_full-protection.js | Prebuilt “full-protection” variant updated with the same JS behavior. |
| js/prebuild/apbct-public-bundle_full-protection_gathering.js | Prebuilt “full-protection + gathering” variant updated with the same JS behavior. |
| js/prebuild/apbct-public-bundle_ext-protection.js | Prebuilt “ext-protection” variant updated with the same JS behavior. |
| js/prebuild/apbct-public-bundle_ext-protection_gathering.js | Prebuilt “ext-protection + gathering” variant updated with the same JS behavior. |
| js/apbct-public-bundle.min.js | Minified bundle updated to reflect the new JS behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Glomberg
approved these changes
May 26, 2026
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.
https://app.doboard.com/1/task/48864