Filter
rpress_is_ssl_enforced
On this page
Filters whether SSL is enforced on the checkout page.
Runs in rpress_is_ssl_enforced() with the value of the enforce SSL setting. The result is cast to bool. It controls the checkout redirect to https and the rewriting of asset URLs on the checkout page.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ssl_enforced | mixed | Value of the enforce_ssl setting, false by default. |
Return value#
bool. True to enforce SSL on checkout.
Example#
function my_is_ssl_enforced( $ssl_enforced ) {
if ( 'local' === wp_get_environment_type() ) {
return false;
}
return $ssl_enforced;
}
add_filter( 'rpress_is_ssl_enforced', 'my_is_ssl_enforced', 10, 1 );
Source#
Applied in:
includes/checkout/functions.php(line 278), inrpress_is_ssl_enforced()
See also#
Was this page helpful?
