Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter TheZenit

    (@thezenit)

    Tried also on a locale clean installation of WordPress + Woocommerce + Storefront theme and the issue is anyway present.
    It’s strange that nobody noticed it so far, because the format is very ugly.
    Anyway, I will try to investigate a little bit more

    Thanks

    Hi @thezenit,

    That’s odd – are you using any additional plugins which may interfere and/or have an influence on the way how the checkout fields are displayed? The way how the fields look is handled by WooCommerce itself and it is done like this:
    {name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country},

    As you can see above, each field is separated by the new line (\n), however, in some cases the final output depends on the way the fields were filled e.g. you may enter the entire address in the {address_1}, not even using the {address_2} field.

    Our Flexible Checkout Fields hooks into the WooCommerce default method adding the custom fields but it shouldn’t be changing anything on its own. You may fully customize the way the shipping data is displayed using the woocommerce_localisation_address_formats filter. Here you may also find the more detailed information how it works:

    https://docs.wpovernight.com/woocommerce-print-address-labels/formatting-the-address/

    and here are the modified samples which might be useful:

    https://stackoverflow.com/questions/18859237/woocommerce-how-to-customize-the-addresses-output

    Kind regards,
    Łukasz

    Thread Starter TheZenit

    (@thezenit)

    Hi Łukasz,

    thank you for responding me.
    I tried to add some php code using the woocommerce_localisation_address_formats filter, but it has no effect.
    Instead I tried to disable the plugin and the php code works well.

    Anyway, I solved my problem with some custom php code.

    Thank you

    Same problem here.
    I tried to remove the line breaks by defining a format with this code, but it didn’t change anything.

    add_filter( 'woocommerce_localisation_address_formats', 'woocommerce_custom_address_format' );
    
    function woocommerce_custom_address_format( $formats ) {
        $formats['DE'] = "{name}\n{company}\n{address_1} {address_2}\n{postcode} {city}\n{state}\n{country}";
    	$formats['AT'] = "{name}\n{company}\n{address_1} {address_2}\n{postcode} {city}\n{state}\n{country}";
    	$formats['BE'] = "{name}\n{company}\n{address_1} {address_2}\n{postcode} {city}\n{state}\n{country}";
    	$formats['CH'] = "{name}\n{company}\n{address_1} {address_2}\n{postcode} {city}\n{state}\n{country}";
    	$formats['IT'] = "{name}\n{company}\n{address_1} {address_2}\n{postcode} {city}\n{state}\n{country}";
    	$formats['PL'] = "{name}\n{company}\n{address_1} {address_2}\n{postcode} {city}\n{state}\n{country}"; 
        return $formats;
    }

    Is there already a fix for this bug?

    Have the same problem. First and Last name are divided into two rows under Billing but are kept together under Shipping. Same for Postal code and City.

    Have tried other similar plugins without that problem. The problem disappears when the plugin is disabled. Have no other similar plugin installed that could interfere.

    I really great appreciate the plugin so a solution would be very nice.

    Thanks for a nice plugin!

    Hello @red_crazy_duck @dasnyal @thezenit @lusp,

    We will look into this. I’ll let you know when we’ll provide changes.

    Best regards,
    Marta

    Hello @red_crazy_duck @dasnyal @thezenit @lusp,

    I would like to inform you that this issue has been resolved in the newest version of our plugin. Please up to date Flexible Checkout Fields.

    Best regards,
    Marta

    Brilliant!
    Now it looks correct.
    Thanks for excellent help and and excellent plugin!

    Thank you so much @red_crazy_duck!

    @martapaw
    It is still not working for me.
    Now the format of the address looks like this:

    {name}
    {country}
    {address_1}
    {address_2}
    {city} {postcode}
    {Email}

    The City and the postcode is rotated and the country should be after the postode and city.

    Hello @dasnyal,

    Please use the new feature to display the fields as you want: http://wpdesk.me/mp/79ml7.png

    Best regards,
    Marta

    @martapaw

    It is working now as it should.
    Thank you very much!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Some formatting issues’ is closed to new replies.