pmpro_http_request_args_for_addons

Disables SSL verification to prevent download package failures.

Description

(array) pmpro_http_request_args_for_addons( (array) $args, (string) $url ); 

Returns (array)

$args Amended array of request args.

Parameters (2)

0. $args (array)
Array of request args.
1. $url (string)
The URL to be pinged.

Usage

  1. if ( !function_exists( 'pmpro_http_request_args_for_addons' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/addons.php'; 
  3.  
  4. // Array of request args. 
  5. $args = array(); 
  6.  
  7. // The URL to be pinged. 
  8. $url = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = pmpro_http_request_args_for_addons($args, $url); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/addons.php  
  1. function pmpro_http_request_args_for_addons($args, $url)  
  2. // If this is an SSL request and we are performing an upgrade routine, disable SSL verification. 
  3. if(strpos($url, 'https://') !== false && strpos($url, PMPRO_LICENSE_SERVER) !== false && strpos($url, "download") !== false) 
  4. $args['sslverify'] = false; 
  5.  
  6. return $args;