PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
tier-pricing-table / src / Addons / NonLoggedInUsers / Wholesale / Emails / EmailsManager.php

EmailsManager.php in Tiered Pricing Table for WooCommerce 8.0.2, at src/Addons/NonLoggedInUsers/Wholesale/Emails/EmailsManager.php

32 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\NonLoggedInUsers\Wholesale\Emails;
2
3 class EmailsManager {
4
5 const ACTIONS = array(
6 'tiered_pricing_table/wholesale/application_submitted',
7 'tiered_pricing_table/wholesale/application_approved',
8 'tiered_pricing_table/wholesale/application_rejected',
9 );
10
11 public function __construct() {
12 add_filter( 'woocommerce_email_classes', array( $this, 'registerEmails' ) );
13
14 // WooCommerce loads its mailer (and with it these e-mail classes) only for the actions in this
15 // list; each action is then re-fired as "<action>_notification", which the e-mails listen to
16 add_filter( 'woocommerce_email_actions', array( $this, 'registerActions' ) );
17 }
18
19 public function registerActions( $actions ): array {
20 return array_values( array_unique( array_merge( (array) $actions, self::ACTIONS ) ) );
21 }
22
23 public function registerEmails( array $emails ): array {
24 $emails['TPT_Wholesale_Admin_New_Application'] = new AdminNewApplicationEmail();
25 $emails['TPT_Wholesale_Customer_Received'] = new CustomerApplicationReceivedEmail();
26 $emails['TPT_Wholesale_Customer_Approved'] = new CustomerApplicationApprovedEmail();
27 $emails['TPT_Wholesale_Customer_Rejected'] = new CustomerApplicationRejectedEmail();
28
29 return $emails;
30 }
31 }
32