WC_Settings_Emails::is_trying_new_templates
Check if the user is trying out the new email templates.
Метод класса: WC_Settings_Emails{}
Хуков нет.
Возвращает
true|false.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_trying_new_templates();
Код WC_Settings_Emails::is_trying_new_templates() WC Settings Emails::is trying new templates WC 10.4.3
private function is_trying_new_templates() {
global $current_tab;
if ( 'email' !== $current_tab ) {
return false;
}
if ( isset( $_GET['section'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return false;
}
return isset( $_GET['try-new-templates'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
}