Last active
August 28, 2018 07:37
-
-
Save New0/df61a9f95ae7a156c061e4f4cc2952cf to your computer and use it in GitHub Desktop.
Set email address used for Stripe modal form using url parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* The 'ds_filter_params' filter hook will be available from Direct Stripe 2.1.8 | |
*/ | |
add_filter( 'ds_filter_params', function( $params ){ | |
$email = $_GET['email']; //url parameter set as ?email=user@domain.ext | |
if( isset($email) ){ | |
$params['current_email_address'] = $email; | |
} | |
return $params; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment