Today I was dealing with a “little but annoying” thing. I found that there is an autofocus function on the First Name field under WooCommerce billing and shipping address. In a normal condition, maybe it’s not a problem. But when you did a customisation, for example : Re-order the fields, add some custom fields on the top and put the First Name to the middle or to the bottom, it doesn’t make sense to have the autofocus active.
As usual, I went to Uncle Google and found some threads. I found this and this. But unfortunately, all of those solutions are didn’t work for me. I guess because both of them are using
woocommerce_checkout_fields hook to call their function. Continue reading »