Send an order message to the product author
-
I tried to write such a short code of the author of the message.
function woocommerce_product_author_email2 () { the_author_email (); } add_shortcode('author_email', 'woocommerce_product_author_email2');
I then made a code that sends a copy of the product message to the above short code.
add_filter( 'woocommerce_email_headers', 'bbloomer_order_completed_email_add_cc_bcc', 9999, 3 ); function bbloomer_order_completed_email_add_cc_bcc( $headers, $email_id, $order ) { if ( 'new_order' == $email_id ) { $headers .= "Cc: [author_email]" . "\r\n"; // del if not needed } return $headers; }
It does not work as expected.
What am I missing here?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Send an order message to the product author’ is closed to new replies.