Support » Plugin: WooCommerce Email Validation » Was working very well, but now it needs to be tweaked

  • Because of the lack of recent updates (last one was over 9 months ago), email confirmation field is in the wrong place. Woocommerce move it up, but this plugin never updated it.

    The solution is to add this code to the functions.php of your child theme:

    //RE-ORDER BILLING FIELDS WITH EMAIL VALIDATION
    add_filter("woocommerce_checkout_fields", "order_fields");
    
    function order_fields($fields) {
    
        $order = array(
            "billing_country",
            "billing_first_name",
            "billing_last_name",
            "billing_company",
            "billing_address_1",
            "billing_address_2",
    	"billing_city",
            "billing_state",
            "billing_postcode",
            "billing_email",
    	"billing_email-2",
            "billing_phone"
    
        );
        foreach($order as $field)
        {
            $ordered_fields[$field] = $fields["billing"][$field];
        }
    
        $fields["billing"] = $ordered_fields;
        return $fields;
    
    }
Viewing 1 replies (of 1 total)
  • Plugin Author Hugh Lashbrooke

    (@hlashbrooke)

    For what it’s worth, I ave updated this in v2.0 of the plugin. The field now appears in the correct location by default.

Viewing 1 replies (of 1 total)
  • The topic ‘Was working very well, but now it needs to be tweaked’ is closed to new replies.