Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. ////////// BCC EMAIL /////////////
  2. function bcc_email_headers( $headers ){
  3. $recipient = get_from_address();
  4. $admin = get_option('admin_email');
  5.  
  6. if ( $recipient == $admin ){
  7. $headers .= 'BCC: Name <bcc@mail.com>' . "rn";
  8. }
  9. return $headers;
  10. }
  11. add_action( 'woocommerce_email_headers', 'bcc_email_headers', 10, 3 );
  12.  
  13. ////////// BCC EMAIL by Order Status /////////////
  14. function bcc_email_headers( $headers, $order ){
  15. global $woocommerce;
  16.  
  17. if ( wc_get_order() == 'meu_status' ){
  18. $headers .= 'BCC: Name <bcc@mail.com>' . "rn";
  19. }
  20. return $headers;
  21. }
  22. add_action( 'woocommerce_email_headers', 'bcc_email_headers', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement