-
Notifications
You must be signed in to change notification settings - Fork 843
Forms: Add form response webhooks #46059
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
base: trunk
Are you sure you want to change the base?
Conversation
Added under a feature flag to test the webhook implementation.
This is an exploratory commit where I'm using a different class, based on the Post_To_Url one, to process and dispatch the webhooks on form submission.
|
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 SummaryCoverage changed in 5 files.
2 files are newly checked for coverage.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
I added the webhook id input to the settings section to explore how we could use it for advanced users that would like to programmatically manipulate form data before sending it to webhook. For that, we'll need to expose a filter which I'll bring in a follow up commit.
I'm adding this filter here to allow developers to intercept and modify the form data that I'm sending in the webhook request. This should give enough fleixibility to advanced users.
* let salesforce process remain as it was. Split (just in case) postToUrl and migrate it to a webhook * add class consts for cleaner code * create and validate webhook setup with class consts, ditch non matching formats/methods * use class constants on request process * invert filter params order so data is returned by default even when no filter is set * add tests for Form_Webhooks class * make phan happy on test files * changelog
* 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 the basic form webhook functionality to allow users to integrate with external services.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: