Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

wp_cron_conditionally_prevent_sslverify() WordPress Function

The wp_cron_conditionally_prevent_sslverify() function allows you to prevent WordPress from verifying SSL certificates when making HTTPS requests to external sites. This can be useful if you are making requests to a site that has an invalid or self-signed SSL certificate.

wp_cron_conditionally_prevent_sslverify( array $request ) #

Disables SSL verification if the ‘cron_request’ arguments include an HTTPS URL.


Description

This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS.


Top ↑

Parameters

$request

(array)(Required)The Cron request arguments.


Top ↑

Return

(array) The filtered Cron request arguments.


Top ↑

Source

File: wp-includes/https-detection.php

function wp_cron_conditionally_prevent_sslverify( $request ) {
	if ( 'https' === wp_parse_url( $request['url'], PHP_URL_SCHEME ) ) {
		$request['args']['sslverify'] = false;
	}
	return $request;
}


Top ↑

Changelog

Changelog
VersionDescription
5.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.