Issue After Latest Update
-
Hi,
I use the code below, to verify email on checkout. But after your latest update, it doesn’t show up correctly. It must be next to email field and after the update, it is next to name field in the first row of the form. Can you please help me?
Thank you
Xrisafunction checkout_email_verification_field( $fields ) {
$fields[‘billing’][‘billing_email’][‘class’] = array(‘form-row-first’);
$fields[‘billing’][‘billing_email_ver’] = array(
‘label’ => __(‘Verify Email’, ‘woocommerce’),
‘required’ => true,
‘class’ => array(‘form-row-last’),
‘clear’ => true
);
return $fields;
}
add_filter( ‘woocommerce_checkout_fields’ , ‘checkout_email_verification_field’ );function match_email_addresses() {
$email1 = $_POST[‘billing_email’];
$email2 = $_POST[‘billing_email_ver’];
if ( $email2 !== $email1 ) {
wc_add_notice( __( ‘Emails do not match.’, ‘woocommerce’ ), ‘error’ );
}
}
add_action(‘woocommerce_checkout_process’, ‘match_email_addresses’);
The topic ‘Issue After Latest Update’ is closed to new replies.