Automattic\WooCommerce\Internal\StockNotifications\Emails
CustomerStockNotificationVerifiedEmail::maybe_restore_notification_locale
Restore locale if previously switched.
Метод класса: CustomerStockNotificationVerifiedEmail{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->maybe_restore_notification_locale( $notification );
- $notification(Notification) (обязательный)
- Notification object.
Код CustomerStockNotificationVerifiedEmail::maybe_restore_notification_locale() CustomerStockNotificationVerifiedEmail::maybe restore notification locale WC 11.2.2
private function maybe_restore_notification_locale( $notification ) {
$customer_locale = $notification->get_meta( '_customer_locale' );
if ( ! empty( $customer_locale ) ) {
restore_previous_locale();
}
}