Automattic\WooCommerce\Internal\OrderReviews
Scheduler::get_email
Retrieve the review-request email class instance from the mailer.
Method of the class: Scheduler{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->get_email(): ?WC_Email_Customer_Review_Request;
Scheduler::get_email() Scheduler::get email code WC 10.9.4
private function get_email(): ?WC_Email_Customer_Review_Request {
$mailer = WC()->mailer();
if ( ! $mailer ) {
return null;
}
$emails = $mailer->get_emails();
$email = $emails['WC_Email_Customer_Review_Request'] ?? null;
return $email instanceof WC_Email_Customer_Review_Request ? $email : null;
}