tier-pricing-table
/
src
/
Addons
/
NonLoggedInUsers
/
Wholesale
/
Emails
/
CustomerApplicationReceivedEmail.php
CustomerApplicationReceivedEmail.php in Tiered Pricing Table for WooCommerce 8.0.2, at src/Addons/NonLoggedInUsers/Wholesale/Emails/CustomerApplicationReceivedEmail.php
| 1 | <?php namespace TierPricingTable\Addons\NonLoggedInUsers\Wholesale\Emails; |
| 2 | |
| 3 | use TierPricingTable\Addons\NonLoggedInUsers\Wholesale\Settings\Settings; |
| 4 | |
| 5 | if ( ! defined( 'ABSPATH' ) ) { |
| 6 | exit; |
| 7 | } |
| 8 | |
| 9 | class CustomerApplicationReceivedEmail extends AbstractApplicationEmail { |
| 10 | |
| 11 | public function __construct() { |
| 12 | $this->id = 'tpt_wholesale_customer_received'; |
| 13 | $this->title = __( 'Wholesale application received', 'tier-pricing-table' ); |
| 14 | $this->description = __( 'Sent to the applicant when the application is waiting for approval.', 'tier-pricing-table' ); |
| 15 | $this->template_html = 'emails/customer-application-received.php'; |
| 16 | $this->template_plain = 'emails/plain/customer-application-received.php'; |
| 17 | $this->customer_email = true; |
| 18 | |
| 19 | parent::__construct(); |
| 20 | } |
| 21 | |
| 22 | protected function getTriggerAction(): string { |
| 23 | return 'tiered_pricing_table/wholesale/application_submitted'; |
| 24 | } |
| 25 | |
| 26 | public function trigger( $applicationId ) { |
| 27 | // with automatic approval the "approved" e-mail follows right away; this one would only add noise |
| 28 | if ( Settings::isAutoApproval() ) { |
| 29 | return; |
| 30 | } |
| 31 | |
| 32 | parent::trigger( $applicationId ); |
| 33 | } |
| 34 | |
| 35 | public function get_default_subject() { |
| 36 | return __( 'We received your wholesale application', 'tier-pricing-table' ); |
| 37 | } |
| 38 | |
| 39 | public function get_default_heading() { |
| 40 | return __( 'Thank you for applying', 'tier-pricing-table' ); |
| 41 | } |
| 42 | } |
| 43 |