Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCTransactionalEmailPostsManager::template_exists │ public │ WC 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.

Метод класса: WCTransactionalEmailPostsManager{}

Хуков нет.

Возвращает

bool. True if the template exists, false otherwise.

Использование

$WCTransactionalEmailPostsManager = new WCTransactionalEmailPostsManager();
$WCTransactionalEmailPostsManager->template_exists( $email_type );
$email_type(строка) (обязательный)
The type of email to check.

Код WCTransactionalEmailPostsManager::template_exists() WC 11.2.2

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