fgc-on-hold-subscription-email.php 1.07 KB
<?php

/**
 * Plugin Name: WooCommerce Custom On-hold Subscription Email
 * Plugin URI:
 * Description: WooCommerce Custom On-hold Subscription Email
 * Author: Phuong An <phuongantt.na@gmail.com>
 * Author URI: http://fgc.vn
 * Version: 0.1
 *
 * License: GNU General Public License v3.0
 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
 *
 */
if (!defined('ABSPATH'))
    exit; // Exit if accessed directly


/**
 *  Add a custom email to the list of emails WooCommerce should load
 *
 * @since 0.1
 * @param array $email_classes available email classes
 * @return array filtered available email classes
 */

function add_notification_take_month_off_email($email_classes) {

    // include our custom email class
    require( 'includes/class-notification-take-month-off-email.php' );

    // add the email class to the list of email classes that WooCommerce loads
    $email_classes['WC_Notification_Take_Month_Off_Email'] = new WC_Notification_Take_Month_Off_Email();

    return $email_classes;
}

add_filter('woocommerce_email_classes', 'add_notification_take_month_off_email');