Automattic\WooCommerce\Internal\StockNotifications

NotificationQuery::product_has_active_notifications │ public static │ WC 1.0

Check if a product has active notifications.

Method of the class: NotificationQuery{}

No Hooks.

Returns

bool. True if the product has active notifications, false otherwise.

Usage

$result = NotificationQuery::product_has_active_notifications( $product_ids ): bool;
$product_ids(array) (required)
The product IDs to check.

NotificationQuery::product_has_active_notifications() code WC 11.2.1

public static function product_has_active_notifications( array $product_ids ): bool {
	$data_store = self::load_data_store();

	return $data_store ? $data_store->product_has_active_notifications( $product_ids ) : false;
}