Filter
uncanny-automator-pro
edd_sl_api_request_verify_ssl
Filters whether SSL verification is performed for Easy Digital Downloads Software Licensing API requests.
add_filter( 'edd_sl_api_request_verify_ssl', $callback, 10, 1 );
Description
Filters whether to verify SSL certificates for Easy Digital Downloads Software Licensing API requests. Use this to disable SSL verification for specific scenarios, though it's strongly discouraged for security reasons. Defaults to true.
Usage
add_filter( 'edd_sl_api_request_verify_ssl', 'your_function_name', 10, 1 );
Parameters
-
$this(mixed) - This parameter represents the initial boolean value indicating whether SSL verification should be performed for API requests, which can be overridden by the filter.
Return Value
The filtered value.
Examples
add_filter( 'edd_sl_api_request_verify_ssl', 'my_custom_edd_sl_verify_ssl', 10, 2 );
/**
* Custom function to control SSL verification for EDD Software Licensing API requests.
*
* This example demonstrates how to disable SSL verification for specific EDD store API requests.
* This might be useful for development environments or if a particular store has certificate issues.
* It's strongly recommended to only disable SSL verification when absolutely necessary and
* to understand the security implications.
*
* @param bool $verify_ssl The current SSL verification status (true by default).
* @param object $this The instance of the EDD_SL_Plugin_Updater class.
* @return bool The modified SSL verification status.
*/
function my_custom_edd_sl_verify_ssl( $verify_ssl, $updater_instance ) {
// You can add conditional logic here based on the store URL or other properties
// of the $updater_instance if you only want to disable SSL for certain sites.
// For example:
// if ( strpos( $updater_instance->store_url, 'my-development-site.com' ) !== false ) {
// return false; // Disable SSL verification
// }
// For this example, we'll disable SSL verification globally.
// REMINDER: This is generally NOT recommended for production environments due to security risks.
return false;
}
Placement
This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.
Source Code
uncanny-automator-pro/src/core/admin/licensing/EDD_SL_Plugin_Updater.php:703
private function verify_ssl() {
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
}