Title: Add new shortcode
Last modified: June 21, 2019

---

# Add new shortcode

 *  Resolved [topmostwp](https://wordpress.org/support/users/topmostwp/)
 * (@topmostwp)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/)
 * Hello, is there a way to add a new shortcode/placeholder? Like i want to add 
   a new placeholder for customer email {customer_email}. Thanks ben

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

 *  Plugin Contributor [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11660839)
 * Hey,
    You can use a code like this:
 *     ```
       add_filter( 'kadence_woomail_order_body_text', 'custom_email_placeholder', 15, 5 );
       function custom_email_placeholder( $body_text, $order, $sent_to_admin, $plain_text, $email ) {
       if ( $order ) {
       $body_text = str_replace( '{customer_email}', $order->get_billing_email(), $body_text );
       }
       return $body_text;
       }
       ```
   
 *  Thread Starter [topmostwp](https://wordpress.org/support/users/topmostwp/)
 * (@topmostwp)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11661902)
 * Hi Ben,
 * I added the code to function.php and when I tried to add the {customer_email}
   shortcode. It doesnt work.
 *  Plugin Contributor [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11662923)
 * Which email are you wanting to show this in?
 * Ben
 *  Thread Starter [topmostwp](https://wordpress.org/support/users/topmostwp/)
 * (@topmostwp)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11665232)
 * Hi ben, i want to show this in customer new account email
 *  Plugin Contributor [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11667351)
 * ok, thats a little different then order emails. You would need to use code like
   this:
 *     ```
       add_filter( 'kadence_woomail_no_order_body_text', 'custom_email_placeholder_no_order', 15, 2 );
       function custom_email_placeholder_no_order( $body_text, $email ) {
       if ( is_a( $email->object, 'WP_User' ) ) {
       $body_text = str_replace( '{customer_email}', $email->object->user_email, $body_text );
       }
       return $body_text;
       ```
   
 *  Thread Starter [topmostwp](https://wordpress.org/support/users/topmostwp/)
 * (@topmostwp)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11695534)
 * Thank you Ben it’s now working! Thanks for the great plugin

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

The topic ‘Add new shortcode’ is closed to new replies.

 * ![](https://ps.w.org/kadence-woocommerce-email-designer/assets/icon-256x256.png?
   rev=3115863)
 * [Kadence WooCommerce Email Designer](https://wordpress.org/plugins/kadence-woocommerce-email-designer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kadence-woocommerce-email-designer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/)
 * [Active Topics](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [topmostwp](https://wordpress.org/support/users/topmostwp/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/add-new-shortcode-2/#post-11695534)
 * Status: resolved