Automattic\WooCommerce\Internal\StockNotifications
NotificationQuery::run_query
Single dispatch site to the underlying data store's query() method.
Centralised so the WC_Data_Store::query() PHPStan suppression in phpstan-baseline.neon only needs to cover one call site.
Method of the class: NotificationQuery{}
No Hooks.
Returns
mixed. Whatever the data store returns for the requested return mode (array of objects/ids, int for count), or null while the feature is off.
Usage
$result = NotificationQuery::run_query( $args );
- $args(array) (required)
- Query args.
NotificationQuery::run_query() NotificationQuery::run query code WC 11.2.1
private static function run_query( array $args ) {
$data_store = self::load_data_store();
return $data_store ? $data_store->query( $args ) : null;
}