Automattic\WooCommerce\Internal\Admin\EmailPreview
EmailPreview::switch_to_site_locale
Switch to the site locale. This is to ensure the email is displayed in the store's language, as the customer would see it, not the admin's language.
Метод класса: EmailPreview{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->switch_to_site_locale();
Код EmailPreview::switch_to_site_locale() EmailPreview::switch to site locale WC 10.7.0
private function switch_to_site_locale() {
if ( ! $this->locale_switched ) {
wc_switch_to_site_locale();
$this->locale_switched = true;
}
}