This commit renames two variables to make it easier to understand the
code responsible for adding a ReCapcha to a subscription form:
formData.recaptcha -> formData.recaptchaWidgetId
formData.data.recaptcha -> formData.data.recaptchaResponseToken
Before this change it was harder to understand the difference between
formData.recaptcha and formData.data.recaptcha since they used the same
name.
[MAILPOET-4145]
This commit adds the required code to display the invisible ReCaptcha in
the frontend when a form is rendered and this type of captcha is
selected in the admin.
[MAILPOET-4145]
In order for 3rd parties to hook into the subscription process, e.g. to
validate the data themselves, the action hook
mailpoet_subscription_before_subscribe has been added. [MAILPOET-3632]