Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCTransactionalEmailPostsManager::template_existspublicWC 1.0

Checks if an email template exists for the given type.

Type here refers to the email type, e.g. 'customer_new_account' from the WC_Email->id property.

Method of the class: WCTransactionalEmailPostsManager{}

No Hooks.

Returns

true|false. True if the template exists, false otherwise.

Usage

$WCTransactionalEmailPostsManager = new WCTransactionalEmailPostsManager();
$WCTransactionalEmailPostsManager->template_exists( $email_type );
$email_type(string) (required)
The type of email to check.

WCTransactionalEmailPostsManager::template_exists() code WC 10.3.6

public function template_exists( $email_type ) {
	return null !== $this->get_email_post( $email_type );
}