Title: Add code to email
Last modified: August 23, 2021

---

# Add code to email

 *  Resolved [woober](https://wordpress.org/support/users/woober/)
 * (@woober)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-to-email/)
 * Hi
 * This code below will send a BCC:
 *     ```
       add_filter( 'woocommerce_email_headers', 'firefog_headers_filter_function', 10, 2);
       function firefog_headers_filter_function( $headers, $object ) {
           if ($object == 'new_order') {
               $headers .= 'BCC: NAME <name@domain.com>' . "\r\n";
           }
   
           return $headers;
       }
       ```
   
 * But how can i apply the below code to the BCC email?
 *     ```
       <script type="application/json+trustpilot">
           {
               "recipientName": "Dynamic code...",
               "recipientEmail": "Dynamic code...",
               "referenceId": "Dynamic code...",
               "locale": "Dynamic code..."
             }
       </script>
       ```
   
    -  This topic was modified 4 years, 9 months ago by [woober](https://wordpress.org/support/users/woober/).

Viewing 1 replies (of 1 total)

 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-to-email/#post-14797249)
 * Hi [@woober](https://wordpress.org/support/users/woober/),
 * I can see you set the thread to Resolved so I assume you managed to get this 
   solved. If not, since this forum is just for the default features of WooCommerce,
   you may want to post your question on these channels for developers:
    - [WooCommerce Slack Community](https://woocommerce.com/community-slack/)
    - [Advanced WooCommerce group on Facebook](https://www.facebook.com/groups/advanced.woocommerce/)
 * Cheers.

Viewing 1 replies (of 1 total)

The topic ‘Add code to email’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-to-email/#post-14797249)
 * Status: resolved