THIS THREAD HAS BEEN CLOSED.

Billing Email Field function not working when Ongkos Kirim is activated.
Updated on January 16, 2020 in Plugin Ongkos Kirim
Premium  2 on January 12, 2020

Hello,

I need the Email Field in the checkout page to be at the very top of the form. I have added this code into child-theme/functions.php

add_filter("woocommerce_checkout_fields", "custom_override_checkout_fields", 1 );
function custom_override_checkout_fields($fields) {
$fields[‘billing’][‘billing_email’][‘priority’] = 1;
return $fields;
}

But the code works ONLY when Tonjoo Ongkos Kirim is disabled. Please fix.

When new users sign up, they enter their name, country, address and then enter their email at the very bottom… but as soon as they enter their email, the country/district go blank and the customer needs to fill out that information again. I thought the easiest fix is to move the email field to the top. It should work but it’s not because there seems to be some conflict with Ongkos Kirim.

Please help.

Thank you!

  • Liked by
By using the forum you are agree with tonjoo studio license agreement
Moderator 0 on January 13, 2020

Hi,
Try to change the last argument from "1" to be "100", so the code looks like this:

add_filter("woocommerce_checkout_fields", "custom_override_checkout_fields", 100 );

  • Liked by
Cancel
By using the forum you are agree with tonjoo studio license agreement
Message :
Premium  0 on January 16, 2020

Thank you so much!!!!

  • Liked by
Cancel
By using the forum you are agree with tonjoo studio license agreement
Message :
Loading more replies
You are not logged in

Please login here or simply sign up here .