-
Notifications
You must be signed in to change notification settings - Fork 843
Forms: Add webhook logging and initialization flag #46110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forms: Add webhook logging and initialization flag #46110
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryNo summary data is available for parent commit 079abaf, so cannot calculate coverage changes. 😴 If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 079abaf is available. Full summary · PHP report · JS report Coverage check overridden by
Coverage tests to be added later
|
41f2dea to
e94c02d
Compare
* add logging for skipped webhooks * only init webhooks class if webhooks are enabled * changelog * add tests for webhooks and contact form flags * fix phan issues
Proposed changes
This PR adds enhanced logging and a feature flag for the webhook functionality in Jetpack Forms:
jetpack_forms_webhooks_enabledfilter flag to control webhook initializationjetpack_forms_logactionDoes this pull request change what data or activity we track or use?
No
Testing instructions
Enable webhooks via the filter flag:
Create a form with webhook configuration in the block editor
Test logging for skipped webhooks:
webhook_skippedwith reasonurl_empty)webhook_skippedwith reasonformat_invalid)webhook_skippedwith reasonmethod_invalid)Verify that without the filter flag enabled, webhooks are not initialized even if configured in the form
Hook into the
jetpack_forms_logaction to capture the logging: