Missing woocommerce_email_classes Hook
-
Hi,
It would be nice to have the woocommerce_email_classes hook when getting the emails array otherwise there is no way to add custom email class to the preview.
public function load_email_classes() {$page = filter_input( INPUT_GET, ‘page’ );
if ( class_exists( ‘WC_Emails’ ) && $page == ‘codemanas-woocommerce-preview-emails’ ) {
$wc_emails = \WC_Emails::instance();
// without hook
// $emails = $wc_emails->get_emails();// add hook
$emails = apply_filters( ‘woocommerce_email_classes’, $wc_emails->get_emails() );
The topic ‘Missing woocommerce_email_classes Hook’ is closed to new replies.