Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set email address used for Stripe modal form using url parameter
<?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