Automattic\WooCommerce\Internal\DataStores\StockNotifications
StockNotificationsDataStore::get_distinct_dates
Get distinct notification creation dates.
Метод класса: StockNotificationsDataStore{}
Хуков нет.
Возвращает
array.
Использование
$StockNotificationsDataStore = new StockNotificationsDataStore(); $StockNotificationsDataStore->get_distinct_dates();
Код StockNotificationsDataStore::get_distinct_dates() StockNotificationsDataStore::get distinct dates WC 11.2.2
public function get_distinct_dates() {
global $wpdb;
$results = $wpdb->get_results(
$wpdb->prepare(
'SELECT DISTINCT
YEAR(date_created_gmt) AS year,
MONTH(date_created_gmt) AS month
FROM %i
ORDER BY year DESC, month DESC',
$this->get_table_name()
)
);
return $results;
}