Skip to content

Instantly share code, notes, and snippets.

@lkoudal
Forked from ashfame/after.php
Created April 25, 2014 19:01
Show Gist options
  • Save lkoudal/11299681 to your computer and use it in GitHub Desktop.
Save lkoudal/11299681 to your computer and use it in GitHub Desktop.
$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 );
$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