wp_cron_conditionally_prevent_sslverify

The timeline below displays how wordpress function wp_cron_conditionally_prevent_sslverify has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Disables SSL verification if the 'cron_request' arguments include an HTTPS URL.
 *
 * This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS.
 *
 * @since 5.7.0
 * @access private
 *
 * @param array $request The cron request arguments.
 * @return array The filtered cron request arguments.
 */
function wp_cron_conditionally_prevent_sslverify($request)
{
    if ('https' === wp_parse_url($request['url'], PHP_URL_SCHEME)) {
        $request['args']['sslverify'] = false;
    }
    return $request;
}

WordPress Version: 5.9

/**
 * Disables SSL verification if the 'cron_request' arguments include an HTTPS URL.
 *
 * This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS.
 *
 * @since 5.7.0
 * @access private
 *
 * @param array $request The Cron request arguments.
 * @return array The filtered Cron request arguments.
 */
function wp_cron_conditionally_prevent_sslverify($request)
{
    if ('https' === wp_parse_url($request['url'], PHP_URL_SCHEME)) {
        $request['args']['sslverify'] = false;
    }
    return $request;
}

WordPress Version: 5.7

/**
 * Disables SSL verification if the 'cron_request' arguments include an HTTPS URL.
 *
 * This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS.
 *
 * @since 5.7.0
 * @access private
 *
 * @param array $request The Cron request arguments.
 * @return array $request The filtered Cron request arguments.
 */
function wp_cron_conditionally_prevent_sslverify($request)
{
    if ('https' === wp_parse_url($request['url'], PHP_URL_SCHEME)) {
        $request['args']['sslverify'] = false;
    }
    return $request;
}