• Resolved alex4e

    (@alex4e)


    Hello,

    I’ve had an issue with reordered fields for customer account page: my custom order set with Flexible Checkout Fields for WooCommerce was not working. The custom order was fine on checkout page only.

    After some time of debbuging, I found that you’ve missed a check in class-flexible-checkout-fields-plugin.php on line 253:

    Here

    	public function woocommerce_default_address_fields( $fields ) {
    		if ( is_checkout() ) {
    			foreach ( $fields as $key => $field ) {
    				unset( $fields[ $key ]['priority'] );
    			}
    		}
    
    		return $fields;
    	}
    

    has to be

    
    	public function woocommerce_default_address_fields( $fields ) {
    		if ( is_checkout() || is_account_page() ) {
    			foreach ( $fields as $key => $field ) {
    				unset( $fields[ $key ]['priority'] );
    			}
    		}
    
    		return $fields;
    	}
    

    Otherwise, the wc_address_i18n_params has priority and custom order not works.

    I hope this fix will help other users and you as well, and will be included in the next update.

    ??

    • This topic was modified 5 years, 7 months ago by alex4e.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support przemyslawrosa

    (@przemyslawrosa)

    Hi,

    thanks for posting and solution desciption ??

    The only thing I miss is to understand what you mean by “custom order set”?

    I would like to recreate a bug in my environment but without this I am not able to do this without this.

    Cheers,

    Thread Starter alex4e

    (@alex4e)

    Hi @przemyslawrosa,

    First of all, in my shop shipping destination is set to Force shipping to the customer billing address (3rd option from WC settings).
    After your plugin activation, go to Billing tab, reorder fields (make any change, just not to be the default order) and save. The new custom order is visible on checkout page, but it’s not at the account edit address page.

    As I said earlier, there is a missing check in class-flexible-checkout-fields-plugin.php on line 253. The check is only for checkout page, but not for the account edit address page.

    I hope it’s clear now, I’m sorry for misunderstanding ??

    Plugin Support przemyslawrosa

    (@przemyslawrosa)

    Thanks Alex!

    I forward the issue to plugin’s developer for verification. When I get the feedback, I’ll let you know.

    Cheers,
    Pr

    Thread Starter alex4e

    (@alex4e)

    Hi, @przemyslawrosa,

    Just want to let you know that the missed check is still missing, after 5 updates of the plugin..

    Cheers

    Plugin Contributor dyszczo

    (@dyszczo)

    Hi @alex4e,

    I will fix it in the next patch release.

    Best regards,
    dyszczo

    Hello @alex4e,

    Thank you for your patience.
    Please up to date our plugin, you should see the resolved issue.

    Best regards,
    Marta

    Thread Starter alex4e

    (@alex4e)

    @martapaw, no worries, thank you very much! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bugfix: Reordered fields NOT working in customer account address page’ is closed to new replies.