Automattic\WooCommerce\Internal\StockNotifications\Emails
CustomerStockNotificationVerifyEmail::maybe_restore_notification_locale
Restore locale if previously switched.
Method of the class: CustomerStockNotificationVerifyEmail{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->maybe_restore_notification_locale( $notification );
- $notification(Notification) (required)
- Notification object.
CustomerStockNotificationVerifyEmail::maybe_restore_notification_locale() CustomerStockNotificationVerifyEmail::maybe restore notification locale code WC 10.3.6
private function maybe_restore_notification_locale( $notification ) {
$customer_locale = $notification->get_meta( '_customer_locale' );
if ( ! empty( $customer_locale ) ) {
restore_previous_locale();
}
}