WC_Helper::get_cached_connection_datapublic staticWC 1.0

Get cached connection data

Method of the class: WC_Helper{}

No Hooks.

Returns

Array|true|false. cached connection data or false connection data is not cached.

Usage

$result = WC_Helper::get_cached_connection_data();

WC_Helper::get_cached_connection_data() code WC 10.8.1

public static function get_cached_connection_data() {
	$data = get_transient( self::CACHE_KEY_CONNECTION_DATA );
	if ( false !== $data && ! is_array( $data ) ) {
		// Cached data is corrupted, delete and return false to trigger fresh fetch.
		delete_transient( self::CACHE_KEY_CONNECTION_DATA );
		return false;
	}
	return $data;
}