fgc-on-hold-subscription-email.php
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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');