Skip to content

Instantly share code, notes, and snippets.

@asalkey
Created October 9, 2015 17:33
Show Gist options
  • Save asalkey/2139d38bcfd6ca4d78b8 to your computer and use it in GitHub Desktop.
Save asalkey/2139d38bcfd6ca4d78b8 to your computer and use it in GitHub Desktop.
Programmatically trigger WooCommerce email
<?php
$mailer = WC()->mailer();
$mails = $mailer->get_emails();
if ( ! empty( $mails ) ) {
foreach ( $mails as $mail ) {
if ( $mail->id == 'wc_reminder_email' ) {
$mail->trigger();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment