Skip to content
Docs
Get RestroPress

Filter

rpress_is_ssl_enforced

Updated
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#

ParameterTypeDescription
$ssl_enforcedmixedValue 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), in rpress_is_ssl_enforced()

See also#

Was this page helpful?