Created
July 13, 2021 04:42
Star
You must be signed in to star a gist
Preview WooCommerce Email
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
<?php | |
/** | |
* Plugin Name: Preview Email | |
* Author: Sourov | |
*/ | |
function sourov_preview_woo_emails() { | |
$mailer = WC()->mailer(); | |
$email = $mailer->emails['WC_Email_Customer_Processing_Order']; | |
$email->object = wc_get_order( 122867 ); | |
echo $email->style_inline( $email->get_content_html() ); | |
exit; | |
} | |
add_action( 'wp_ajax_previewemail', 'sourov_preview_woo_emails' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment