• Resolved cutu234

    (@cutu234)


    Due to a bug reported here we have to remove the additional address field (billing and shipping) from ALL emails. It looks pretty bad, if all order with Amazon Pay have “undefined” in the address section. I can’t achieve this via modifying the templates since the templates since they use the methods:

    get_formatted_billing_address()
    get_formatted_shipping_address()

    I can’t modify single values.

    Any help would be very appricated. We have to find a solution as soon as possible. It simply doesn’t look right for the customers.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @cutu234

    You can try using a plugin that allows you to customize the email templates and remove the additional address field. One such plugin that I recommend is called “Email Customizer for WooCommerce”. This plugin allows you to customize the email templates and remove any unwanted fields, including the additional address field.

    I hope this helps. Thanks!

    Thread Starter cutu234

    (@cutu234)

    Hi @shameemreza

    thank you very much. In principle, this is a great idea. But installing a plugin for this would be bad enough. But paying for a plugin to fix a Woocommerce bug? Wouldn’t that be rich? Apart from that. I just want to remove a single line. A plugin for that would be way over the top, in my opinion.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @cutu234

    You can explore other free plugins on the www.remarpro.com plugin repository, like Email Customizer for WooCommerce, YayMail, etc. Give it a try and see if it suits your needs!

    Alternatively, have you considered customizing your theme’s code to change your WooCommerce email template? It’s another option you can consider! This way, you can have full control over the design and layout of your emails.

    I believe the issue you’re experiencing is related to the gateway extension you’re using, rather than a bug in WooCommerce core. I went through all the tickets and attempted to recreate the issue in my own setup, but was unsuccessful.

    Thanks!

    Thread Starter cutu234

    (@cutu234)

    You are right, but the Amazon Pay gateway plugin is a product by Woocommerce. ?? I tried 4 plugins for customizing emails. Neither of them let me remove the additional address field. Honestly, why would they? This is a bug! Why would a plugin offer a setting to remove a single value from the address block? That simply doesn’t make sense at all.

    Alternatively, have you considered customizing your theme’s code to change your WooCommerce email template?

    This would be my preferred method! However, I simply haven’t found a way to customize the content (!) of the customer address. I can remove it completely, yes. I can style it, no problem. But I can I remove a single line of it? I tried this, but it didn’t work:

    add_filter( 'woocommerce_order_formatted_billing_address', 'custom_email_formatted_billing_address', 10, 2 );
    function custom_email_formatted_billing_address( $billing_address, $order ){
        unset($billing_address['billing_address_2']);
        return $billing_address;
    }

    And again, while this approach might be ok as a workaround, the problem shouldn’t really exist AT ALL. The additional field is NOT ACTIVE in the checkout. There is absolutely zero reason to put any value anywhere, let alone in the database. But there it is in plain text: UNDEFINED. I really could pull my hair out!

    Thanks for your help. I really appreciate this.

    • This reply was modified 1 year, 7 months ago by cutu234.

    Clearly Woocommerce has got a new problem with shipping labels/fields, (also giving issues in automatic calculation, what can not be deactivated!) Many people seems to have variations of errors..
    And it looks like it is a problem in a recent WC-update.
    Please help to find the ‘root’, instead of providing workarounds….

    Thread Starter cutu234

    (@cutu234)

    Please help to find the ‘root’, instead of providing workarounds….

    Easier said than done. ??

    I got an answer in this thread. It’s an Amazon problem. You can “fix” it by enabling the optional address field. Not perfect, but it may be ok for some time.

    • This reply was modified 1 year, 7 months ago by cutu234.

    Sorry if I was ‘too root’! …

    And sorry to say, that this is not related to Amazon!?

    I dont use Amazon at all, this is a very small local webshop, with a minimum of integrations, other than a local PaymentGateway. Absolutely no connection to Amazon….

    Hi, @madssafi

    Clearly Woocommerce has got a new problem with shipping labels/fields, (also giving issues in automatic calculation, what can not be deactivated!) Many people seems to have variations of errors..
    And it looks like it is a problem in a recent WC-update.
    Please help to find the ‘root’, instead of providing workarounds….

    While I understand your concern, I recommend opening a new thread here.

    We want to make sure that every user’s issues receive their own thread with proper attention. Please note, different sites have different configurations, and that would need different troubleshooting steps.

    We’ll be glad to help once the new thread is created.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove specific fields from all emails’ is closed to new replies.