• Hi,

    I am struggling to find the right way of changing the fields order of My Account > Edit billing/shipping address forms – basically need for the Country field to appear at the bottom. Managed to do this for checkout fields, but I’m now having trouble with the My Account billing/shipping address forms. Could you please help?

    Thanks
    Kate

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Not sure if this will have the desired outcome, have you tried https://www.woocommerce.com/products/woocommerce-checkout-field-editor/?

    Alternatively, you might have to override the core WooCommerce template files with your own ones. There’s a handy guide to get you started on that available at: https://docs.woocommerce.com/document/template-structure/

    Thread Starter Nadya Well

    (@nadya-well)

    Thanks for your reply Riann. The Checkout fields editor allows to change the checkout fields, but as far as I can see it doesn’t work with the forms on My Account pages. I am looking for a function that allows changing the order of the billing/shipping address fields on those pages

    Thread Starter Nadya Well

    (@nadya-well)

    Any chance of getting help with this please?

    try it:

    add_filter( 'woocommerce_default_address_fields', 'change_wc_default_address_fields', 20, 1 );
    function change_wc_default_address_fields($fields){
    	$tmp=array_shift($fields);      # Удаляет первый элемент массива, возвращая его
     	array_splice($fields,2,0,$tmp); # Вставляет элемент после 2-го элемента, удалив с этой позиции 0 элементов
    
    	return $fields;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing order of My Account edit shipping/billing address forms’ is closed to new replies.