Super-simple webhook example that does two things:
- Subscribes new plugin users to MailChimp's mailing list.
- Send post-uninstall custom emails to users based on different uninstall reasons.
- Freemius PHP SDK (https://github.com/Freemius/php-sdk)
- MailChimp PHP SDK (https://github.com/drewm/mailchimp-api)
- Emails sender (e.g. http://swiftmailer.org/)
Please read our documentation to learn how to set up a webhook listener from the Developer Dashboard.
During development on localhost, your webhook will not be accessible from the Internet. Therefore, testing will not automatically work.
- You can examine the webhook calls with tools like RequestBin.
- Or the recommended way is to use tunneling with services like ngrok. This way you can use your IDE and debugger.