Fires on each subscription form submission.
Parameters
- $result
string Result of form submission: success, invalid_email, already, error.
Changelog
- Introduced in Jetpack 3.7.0
How to use this hook
Notes
In the example below, we’ll use the action to trigger a redirection to a specific page as soon as a reader successfully submits their email address in Jetpack’s Subscription form:
function jeherve_custom_sub_redirect_page( $result ) {
if ( 'success' === $result ) {
$thanks_page = 'thank-you';
wp_safe_redirect( $thanks_page );
exit;
}
}
add_action( 'jetpack_subscriptions_form_submission', 'jeherve_custom_sub_redirect_page' );