Automattic\WooCommerce\Internal\PushNotifications\Notifications

Notification::should_send_to_user │ public │ WC 10.9.0

Устарела с версии 1.3.0. Больше не поддерживается и может быть удалена. Используйте get_suppression_reason().

Whether this notification should be delivered to a user.

Kept so a request that loaded older code during a plugin update does not fatal on a call that has moved. Nothing in the plugin calls it; use {@see get_suppression_reason()}, which also names why not.

Метод класса: Notification{}

Хуков нет.

Возвращает

bool.

Использование

$Notification = new Notification();
$Notification->should_send_to_user( $pref_value ): bool;
$pref_value(разное) (обязательный)
The user's stored preference value, or null.

Список изменений

С версии 10.9.0 Введена.
Устарела с 11.3.0 Use get_suppression_reason() instead.

Код Notification::should_send_to_user() WC 11.3.0

public function should_send_to_user( $pref_value ): bool {
	return null === $this->get_suppression_reason( $pref_value );
}