Created
January 18, 2016 03:27
-
-
Save bekarice/e358d558e349a7247bc6 to your computer and use it in GitHub Desktop.
Sets the email $_POST value so WC will prefill the "email" field in the My Account registration form
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 | |
// get the email param if it's set so the registration form can use it | |
function sv_get_account_email_param() { | |
$_POST['email'] = isset( $_GET['email'] ) ? urldecode( $_GET['email'] ) : false; | |
} | |
add_action( 'woocommerce_register_form_start', 'sv_get_account_email_param' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment