• Resolved PIW

    (@dbaldan)


    Hello there and thanks for the wonderful job.

    This plugins works greatly, but I have an issue: It doesn’t output all the fields from the checkout to the Order Email.

    I am using the plugin “Checkout Field Editor for WooCommerce” to add new fields to the checkout and the informations is being saved on the database. But the order email doesn’t display those informations at all.

    After contacted the creators of that plugin, they explained this to me:

    On checking, we could see that you are using the custom email template ( from plugin Kadence WooCommerce Email Designer) for sending emails due to which custom fields are not displayed in emails.

    You can use either of the below methods to display custom fields in your email.

    1. You can use the below hook in order to retrieve the custom fields and their values in your email template.

    get_post_meta($order->ID, ‘field_name’, true);

    You need to write a proper function using the above hook and you need to add it in the corresponding template to achieve your requirement.

    2. Contact the corresponding plugin support and ask their assistance to make corresponding changes in their template such that the custom fields displayed correctly in the email.

    Is there a way to make it to import all the fields from an order? I think someone already posted something like this before https://wordpress.org/support/topic/add-custom-field-to-email/

    Any plans to update this plugin to support custom fields?

    Any help is appreciated

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Hey,
    Any plugin adding fields to an email should already be hooking into the email actions which we don’t change or remove. There should not be any need to call in post meta manually in an email template.

    Can you link to the plugin you are using? I’ll post on their forums asking why they are not hooking into emails through woocommerce actions. Perhaps they have a good reason I’m not aware of.

    Ben

    Thread Starter PIW

    (@dbaldan)

    Ben, thanks for the quick reply.

    The plugin is “Checkout Field Editor for WooCommerce”
    https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro

    I am using the free version.

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Hey,
    I just test that plugin is hooking into the email and it works just fine with this plugin.

    Did you test with a real order?

    Ben

    Thread Starter PIW

    (@dbaldan)

    Yes, I did. On the website I am working, people ask for a quote instead of buying the product directly – the the routine is the same (we just changed the words on the email for Quote instead of buying).

    You can try to make a test and you you notice that the email doesn’t shows the custom fields: http://www.primeinterway.com.br

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    In the customizer are you choosing a real order to preview with?

    Ben

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    I suggest you deactivate our plugin and test.

    Again our plugin is not hindering that checkout plugin, I’ve tested on a clean install.

    Ben

    Thread Starter PIW

    (@dbaldan)

    Thanks for yhe reply, Ben.

    yes, I am chosing the first type – NEW ORDER.
    The question is: on that preview, I CAN SEE the custom fields.

    View post on imgur.com

    But in the actual email for the admin, no

    View post on imgur.com

    Any idea?

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Did you try deactivating this plugin and testing?

    What admin email type are you showing in the second image? It doesn’t appear to be a core woocommerce email. It if it’s it appears to be heavily edited since an image in its own table column is not part of any woocommerce core email.

    Again I must suggest that this plugin is not in any way affecting the use of your checkout plugin.

    Ben

    Thread Starter PIW

    (@dbaldan)

    Yes, I did deactivated it and I got the same result (I am using version 1.2.0).

    But maybe the culprit is another plugin: YITH Request a Quote.
    I will make some tests and report here.

    Thanks

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Yes, I did deactivated it and I got the same result

    Doesn’t that clearly mean that this plugin is not the cause?

    Ben

    Thread Starter PIW

    (@dbaldan)

    Maybe it’s language barrier, but I am not blaming you, Ben.
    I am asking for help, it’s a different thing.

    But thanks for your time anyway.

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Hey,
    I am trying to help, by trying to clarify the information you’ve been given and point you in the right direction.

    You wrote this after posting the response you got from the plugin authors of https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro

    Any plans to update this plugin to support custom fields?

    I spent the time starting with the assumption that there was some kind of conflict with our plugin. There isn’t though and by deactivating our plugin you are also confirming that. So naturally, if you have one plugin author (themehigh) telling you the issue has to do with us and it doesn’t I have to explain and make it clear that it does not have to do with this plugin else we will never be able to get clarity on your issue. I’m trying to make it clear that you’re looking in the wrong place. Finding the source is key.

    I can’t diagnose much further than that though because your issue isn’t happening with normal woocommerce emails. It’s specific to your setup and the emails you are sending. You have to get to the correct source of your issue before you can determine how to resolve.

    I’m trying to make it clear that the source isn’t this plugin and that is why the emphasis on deactivating other plugins and testing.

    It’s a bummer themehigh didn’t properly look into the issue and sent you down this path, I’m not upset that I have to clarify it doesn’t have to do with this plugin and I am wanting to help regardless. That is why I’m trying to point you to the correct source.

    What admin email type are you showing in the second image? It doesn’t appear to be a core woocommerce email. It if it’s it appears to be heavily edited since an image in its own table column is not part of any woocommerce core email.

    I do believe that to be key ^. You need to figure out what that email is and who is sending it. That should help you find the source.

    Ben

    Thread Starter PIW

    (@dbaldan)

    Thanks for all your time and help, Ben.
    I’ve reached the YIYH team to check if they can help me, because it seams that their plugin is affecting it.

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

The topic ‘Custom fields on emails’ is closed to new replies.