Title: conditional order complete template
Last modified: June 24, 2021

---

# conditional order complete template

 *  Resolved [wpshushu](https://wordpress.org/support/users/wpshushu/)
 * (@wpshushu)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/conditional-order-complete-template/)
 * Hi,
 * Thanks for the great plugin. I am using the free version right now. I wonder 
   if it’s possible to apply conditional email templates with this plugin. My situation
   is I have 2 categories of products. I’d like to send slightly different emails
   when user purchases products in each category. I have tried YayMail’s “Copy template”
   button but I don’t know where to find the duplicated template, neither do I know
   how to refer to it. My plan is to make a duplicate template to my current order-
   complete template, modify the duplicate and use custom code to apply the conditional
   logic. I’d like to understand how template copying works in YayMail and how to
   refer to templates from code first.
 * Could someone shed a light? Thanks.

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

 *  Plugin Author [YayCommerce](https://wordpress.org/support/users/yaycommerce/)
 * (@yaycommerce)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/conditional-order-complete-template/#post-14590135)
 * Hello [@wpshushu](https://wordpress.org/support/users/wpshushu/),
 * You can not duplicate a template in YayMail because YayMail load exactly mails
   from WooCommerce here [https://prnt.sc/16jclmf](https://prnt.sc/16jclmf), each
   mail has a working logic configured behind it.
 * If you want extra mails, you need to have another plugin which adds extra emails
   to the WooCommerce list. In this case, YayMail have addons, please see [https://yaycommerce.com/yaymail-woocommerce-email-customizer/#yaymail-addons](https://yaycommerce.com/yaymail-woocommerce-email-customizer/#yaymail-addons)
 * The copy template function is used for copying all content from one template 
   to another, please see [https://share.getcloudapp.com/qGu5rgp4](https://share.getcloudapp.com/qGu5rgp4)
 * I hope this helps. Let me know if you still have any question.
 * Best regards,
    Kelly
    -  This reply was modified 4 years, 11 months ago by [YayCommerce](https://wordpress.org/support/users/yaycommerce/).
 *  Thread Starter [wpshushu](https://wordpress.org/support/users/wpshushu/)
 * (@wpshushu)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/conditional-order-complete-template/#post-14590173)
 * [@yaycommerce](https://wordpress.org/support/users/yaycommerce/)
 * Thanks for the quick clarification.
 * Is there a way to apply content conditionally to YayMail template spots? For 
   example the email heading text in this screenshot [https://www.screencast.com/t/466MoY9P](https://www.screencast.com/t/466MoY9P)
   I would like to show different content based on order item product category. 
   I am half way trying to add shortcodes into the editor. One problem is grab the
   current order ID from my shortcode definition code. Does YayMail somehow provides
   a placeholder or a mechnism?
 * Thanks.
 *  Plugin Author [YayCommerce](https://wordpress.org/support/users/yaycommerce/)
 * (@yaycommerce)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/conditional-order-complete-template/#post-14590249)
 * Hi [@wpshushu](https://wordpress.org/support/users/wpshushu/) ,
 * It seems that you want something like a product shortcode. Unfortunately WooCommerce
   itself has not supported it yet.
    Please find all available shortcodes here [https://prnt.sc/16jrxfh](https://prnt.sc/16jrxfh)
 * Cheers!
 *  Plugin Author [YayCommerce](https://wordpress.org/support/users/yaycommerce/)
 * (@yaycommerce)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/conditional-order-complete-template/#post-14649791)
 * Hello [@wpshushu](https://wordpress.org/support/users/wpshushu/) ,
 * We finally built a conditional logic addon for YayMail, you can have it here 
   [https://yaycommerce.com/yaymail-woocommerce-email-customizer/#conditional-logic](https://yaycommerce.com/yaymail-woocommerce-email-customizer/#conditional-logic)
 * Cheers!

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

The topic ‘conditional order complete template’ is closed to new replies.

 * ![](https://ps.w.org/yaymail/assets/icon-256x256.gif?rev=2900992)
 * [YayMail - WooCommerce Email Customizer](https://wordpress.org/plugins/yaymail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yaymail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yaymail/)
 * [Active Topics](https://wordpress.org/support/plugin/yaymail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yaymail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yaymail/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [YayCommerce](https://wordpress.org/support/users/yaycommerce/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/conditional-order-complete-template/#post-14649791)
 * Status: resolved