get_raw_pricing_data(); if ( false === $data ) { return false; } set_transient( 'wp_rocket_pricing', $data, 12 * HOUR_IN_SECONDS ); return $data; } /** * Gets the pricing data from the pricing endpoint * * @since 3.7.3 * * @return bool|object */ private function get_raw_pricing_data() { $response = $this->send_get_request( [], true ); if ( is_wp_error( $response ) || ( is_array( $response ) && 200 !== $response['response']['code'] ) ) { return false; } return json_decode( wp_remote_retrieve_body( $response ) ); } }