Created
March 17, 2014 22:38
-
-
Save ashfame/9609823 to your computer and use it in GitHub Desktop.
Using WooCommerce email design in custom emails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$email = 'ashfame@example.com'; | |
$subject = 'Custom stuff email'; | |
$email_heading = 'Custom Heading'; | |
$email_content = ''; // whatever it is | |
ob_start(); | |
do_action( 'woocommerce_email_header', $email_heading ); | |
echo $email_content; // or simply have HTML markup outside PHP tags here | |
$email_content = ob_get_clean(); | |
wp_mail( $email, $subject, $email_content ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$email = 'ashfame@example.com'; | |
$subject = 'Custom stuff email'; | |
$email_content = ''; // whatever it is | |
wp_mail( $email, $subject, $email_content ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't work in new WP versions. Any solution?