Filter
rpress_remote_request_verify_ssl
On this page
Filters whether SSL certificates are verified on RestroPress remote HTTP requests.
Applied before RestroPress calls restropress.com to load the add-ons list or to activate or deactivate an add-on license. The returned value is cast to a boolean and passed as the sslverify argument to wp_remote_get() or wp_remote_post(). Returning false disables certificate verification, which is only appropriate on local or staging servers with a broken CA bundle.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$verify_ssl | bool | Whether to verify the remote server's SSL certificate. Defaults to true. |
Return value#
bool. True to verify the certificate, false to skip verification.
Example#
function my_skip_ssl_verify_on_local( $verify_ssl ) {
if ( 'local' === wp_get_environment_type() ) {
return false;
}
return $verify_ssl;
}
add_filter( 'rpress_remote_request_verify_ssl', 'my_skip_ssl_verify_on_local' );
Notes#
Applied in three places: the add-ons screen feed, license activation and license deactivation. All three pass the same single argument.
Source#
Applied in:
includes/admin/add-ons.php(line 217), inrpress_fetch_items()includes/class-rpress-ajax.php(line 1851), inRP_AJAX::activate_addon_license()includes/class-rpress-ajax.php(line 1949), inRP_AJAX::deactivate_addon_license()
Was this page helpful?
