Automattic\WooCommerce\Admin\RemoteSpecs
DataSourcePoller::get_cached_specs()
Gets specs from cache if it exists.
Method of the class: DataSourcePoller{}
Hooks from the method
Return
Array
. list of specs.
Usage
$DataSourcePoller = new DataSourcePoller(); $DataSourcePoller->get_cached_specs();
DataSourcePoller::get_cached_specs() DataSourcePoller::get cached specs code WC 9.7.1
public function get_cached_specs() { $locale = get_user_locale(); $specs_group = get_transient( $this->args['transient_name'] ) ?? array(); $specs = isset( $specs_group[ $locale ] ) ? $specs_group[ $locale ] : null; /** * Filter specs. * * @param array $specs List of specs. * @param string $this->id Spec identifier. * * @since 8.8.0 */ $specs = apply_filters( self::FILTER_NAME_SPECS, $specs, $this->id ); return false !== $specs ? $specs : array(); }