WC_Settings_Emails::is_trying_new_templates
Check if the user is trying out the new email templates.
Method of the class: WC_Settings_Emails{}
No Hooks.
Returns
true|false.
Usage
// private - for code of main (parent) class only $result = $this->is_trying_new_templates();
WC_Settings_Emails::is_trying_new_templates() WC Settings Emails::is trying new templates code WC 10.3.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
}