Reputation: 990
I am using Woocommerce emails variables as refered here: https://docs.woocommerce.com/document/automated-follow-up-emails-docs/email-variables-and-merge-tags/
I've added the variable {customer_name} to my e-mail template title, but it doesn't get processed and still shows the same slug in the email I get.
Using the variable:
What do I need to improve? Best wishes
Upvotes: 1
Views: 5008
Reputation: 4220
In my case, the plugin WooCommerce Multilingual (WPML) was the issue. I temporarily deactivated it to further investigate the issue.
Upvotes: 0
Reputation: 11
Make sure your WooCommerce and all related Woo plugins are up-to-date.
I had this issue but with {order_number} for the default Customer Renewal Invoice email. The Subject and Email Heading would just print {order_number} and not parse it into the actual number like 3890423.
My issue ended up being that the WooCommerce Subscription plugin needed to be updated. I did not realize this until I went to make a ticket and they ask for the System Report. In my report it was showing my Subscription and ShippingEasy plugin needed updates. This DID NOT show up in the normal wordpress plugin dashboard. As far as I knew all of my plugins were updated. Apparently I missed it when the WooCommerce Helper plugin stopped working. Now you have to connect your wordpress site to your WooCommerce account by going to your wordpress dashboard and clicking "WooCommerce" -> "Extentions", then the "WooCommerce.com Subscriptions" tab. Once you connect everything you can finally get the updates you need. VERY annoying. Updates should just be-able to work via the normal plugin dashboard like every other plugin.
I have also read other places that you might need the WooCommerce Follow-Ups plugin to use all of those variable. In fact, what you linked to was documentation for that plugin.
I found my same issue on a couple other threads but they were 'closed' to responses. Hopefully this simple but annoying solution will help someone else.
Upvotes: 1
Reputation: 6650
The first option is to check if you have installed any plugin for sending an email. It might be a conflict with your default one. Just try to disable other plugins except for WooCommerce and try again.
The second option is you can use "woocommerce_email_before_order_table" hook to set your own email thereby customize the code. see below:
add_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions', 10, 2 );
function add_order_email_instructions( $order, $sent_to_admin ) {
if ( ! $sent_to_admin ) {
if ( 'cod' == $order->payment_method ) {
// cash on delivery method
echo '<p><strong>Instructions:</strong> Full payment is due immediately upon delivery: <em>cash only, no exceptions</em>.</p>';
} else {
// other methods (ie credit card)
echo '<p><strong>Instructions:</strong> Please look for "Madrigal Electromotive GmbH" on your next credit card statement.</p>';
}
}
}
You can check this link also. I this guide might be helpful for you.
Thanks.
Upvotes: 0