reset_premium_settings(); } return $result; } /** * Get license * * @return array */ public static function get_license() { // Try to get from cache first. $cached_license = get_transient( self::CACHE_KEY ); if ( false !== $cached_license ) { return is_array( $cached_license ) ? $cached_license : array(); } // Not in cache, fetch from database. $license = get_option( self::OPTION_KEY, array() ); if ( empty( $license ) || ! is_array( $license ) ) { $license = array(); } // Cache for 12 hours. set_transient( self::CACHE_KEY, $license, self::CACHE_DURATION ); return $license; } }