The gform_highrise_verifyhost filter in the Gravity Forms Highrise Add-On allows you to enable or disable the cURL CURLOPT_SSL_VERIFYHOST option.
Usage
add_filter('gform_highrise_verifyhost', 'your_function_name', 10, 1);
Parameters
- is_enabled (bool) – Set to
true
to enable host verification, orfalse
to bypass host verification. Defaults totrue
.
More information
See Gravity Forms Docs: gform_highrise_verifyhost
Examples
Disable Host Verification
Disable SSL host verification using this filter.
add_filter('gform_highrise_verifyhost', 'disable_host_verification', 10, 1); function disable_host_verification($is_enabled) { return false; }
Enable Host Verification
Explicitly enable SSL host verification.
add_filter('gform_highrise_verifyhost', 'enable_host_verification', 10, 1); function enable_host_verification($is_enabled) { return true; }
Conditionally Disable Host Verification
Disable SSL host verification only when a specific condition is met.
add_filter('gform_highrise_verifyhost', 'conditionally_disable_host_verification', 10, 1); function conditionally_disable_host_verification($is_enabled) { if (some_condition()) { return false; } return $is_enabled; }
Log Host Verification Status
Log the current SSL host verification status.
add_filter('gform_highrise_verifyhost', 'log_host_verification_status', 10, 1); function log_host_verification_status($is_enabled) { error_log('Highrise SSL host verification status: ' . ($is_enabled ? 'enabled' : 'disabled')); return $is_enabled; }
Toggle Host Verification Based on Environment
Enable SSL host verification in production, disable it in development.
add_filter('gform_highrise_verifyhost', 'toggle_host_verification_based_on_environment', 10, 1); function toggle_host_verification_based_on_environment($is_enabled) { if (defined('WP_ENV') && WP_ENV === 'development') { return false; } return true; }