Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCTransactionalEmailPostsManager::get_option_nameprivateWC 1.0

Gets the option name for a specific email type.

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

Хуков нет.

Возвращает

string. The option name e.g. 'woocommerce_email_templates_customer_new_account_post_id'

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

// private - только в коде основоного (родительского) класса
$result = $this->get_option_name( $email_type );
$email_type(строка) (обязательный)
The type of email template e.g. 'customer_new_account' from the WC_Email->id property.

Код WCTransactionalEmailPostsManager::get_option_name() WC 11.1.0

private function get_option_name( $email_type ) {
	return str_replace( '%', $email_type, self::WC_OPTION_NAME );
}