Automattic\WooCommerce\Internal\Admin\Orders

ListTable::get_and_maybe_update_months_filter_cacheprotectedWC 1.0

Deprecated since 9.9.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Get order year-months cache. We cache the results in the options table, since these results will change very infrequently. We use the heuristic to always return current year-month when getting from cache to prevent an additional query.

Method of the class: ListTable{}

No Hooks.

Returns

Array. List of year-months.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_and_maybe_update_months_filter_cache(): array;

Changelog

Deprecated since 9.9.0

ListTable::get_and_maybe_update_months_filter_cache() code WC 10.3.5

protected function get_and_maybe_update_months_filter_cache(): array {
	wc_deprecated_function(
		__METHOD__,
		'9.9.0',
		'get_months_filter_options'
	);

	return $this->get_months_filter_options();
}