A WordPress-centric search engine for devs and theme authors



wp_cron_conditionally_prevent_sslverify ›

Since5.7.0
Deprecatedn/a
wp_cron_conditionally_prevent_sslverify ( $request )
Access:
  • private
Parameters:
  • (array) $request The Cron request arguments.
    Required: Yes
Returns:
  • (array) $request The filtered Cron request arguments.
Defined at:
Codex:

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.


Source

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