Automattic\WooCommerce\Internal\StockNotifications

NotificationQuery::notification_exists_by_user_id │ public static │ WC 1.0

Get a notification by user ID.

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

Хуков нет.

Возвращает

bool. True if the notification exists, false otherwise.

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

$result = NotificationQuery::notification_exists_by_user_id( $product_id, $user_id ): bool;
$product_id(int) (обязательный)
The product ID.
$user_id(int) (обязательный)
The user ID.

Код NotificationQuery::notification_exists_by_user_id() WC 11.2.2

public static function notification_exists_by_user_id( int $product_id, int $user_id ): bool {
	$data_store = self::load_data_store();

	return $data_store ? $data_store->notification_exists_by_user_id( $product_id, $user_id ) : false;
}