WC_Admin_Report::get_cached_query( string $query_hash )

Get the cached query result or null if it’s not in the cache.


Description Description


Parameters Parameters

$query_hash

(Required) The query hash.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/admin/reports/class-wc-admin-report.php

	protected function get_cached_query( $query_hash ) {
		$class = strtolower( get_class( $this ) );

		if ( ! isset( self::$cached_results[ $class ] ) ) {
			self::$cached_results[ $class ] = get_transient( strtolower( get_class( $this ) ) );
		}

		if ( isset( self::$cached_results[ $class ][ $query_hash ] ) ) {
			return self::$cached_results[ $class ][ $query_hash ];
		}

		return null;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.