Skip to content

Instantly share code, notes, and snippets.

@New0
Last active August 28, 2018 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save New0/df61a9f95ae7a156c061e4f4cc2952cf to your computer and use it in GitHub Desktop.
Save New0/df61a9f95ae7a156c061e4f4cc2952cf to your computer and use it in GitHub Desktop.
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