Automattic\WooCommerce\Internal\StockNotifications

NotificationQuery::product_has_active_notificationspublic staticWC 1.0

Check if a product has active notifications.

Method of the class: NotificationQuery{}

No Hooks.

Returns

true|false. 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 10.3.6

public static function product_has_active_notifications( array $product_ids ): bool {
	return \WC_Data_Store::load( 'stock_notification' )->product_has_active_notifications( $product_ids );
}