I try to reorder the WooCommerce account password field on the checkout page with the code below. However, it creates a new field but does not move the account password field.
I followed the instructions from that page here: https://jeroensormani.com/ultimate-guide-to-woocommerce-checkout-fields/#sorting-checkout-fields
How can I reorder the account password filed on WooCommerce checkout?
Goal: The Account password field should be after the email field.
function js_sort_checkout_fields( $fields ) {
$fields['billing']['account_password']['priority'] = 111;
return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'js_sort_checkout_fields' );```