Register nonce used same name as register form button.
This commit is contained in:
parent
9f438edfa0
commit
1c46b7324a
|
@ -856,7 +856,10 @@ class WC_Form_Handler {
|
|||
* Process the registration form.
|
||||
*/
|
||||
public static function process_registration() {
|
||||
if ( ! empty( $_POST['register'] ) && wp_verify_nonce( $_POST['register'], 'register' ) ) {
|
||||
print_r( $_POST );
|
||||
//die( 'Before' );
|
||||
if ( ! empty( $_POST['register'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'woocommerce-register' ) ) {
|
||||
die( 'Passed' );
|
||||
|
||||
if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) {
|
||||
$_username = $_POST['username'];
|
||||
|
|
|
@ -98,7 +98,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php do_action( 'register_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-register', 'register' ); ?>
|
||||
<?php wp_nonce_field( 'woocommerce-register' ); ?>
|
||||
<input type="submit" class="button" name="register" value="<?php _e( 'Register', 'woocommerce' ); ?>" />
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in New Issue