wordpress / latest / functions / wp_cron_conditionally_prevent_sslverify.html

wp_cron_conditionally_prevent_sslverify( array $request ): array

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.

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.

Parameters

$request array Required
The cron request arguments.

Return

array The filtered cron request arguments.

Source

File: wp-includes/https-detection.php. View all references

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

Uses

Uses Description

Changelog

Version Description
5.7.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_cron_conditionally_prevent_sslverify