Skip to content
Docs
Get RestroPress

Filter

rpress_enforced_ssl_asset_filters

Updated
On this page

Filters the WordPress filter tags whose URLs are rewritten to https on SSL-enforced checkouts.

Runs in rpress_enforced_ssl_asset_handler() on template_redirect, only when SSL is enforced, the request is the checkout page and it is not the admin. Each returned tag gets rpress_enforced_ssl_asset_filter() attached at priority 1, which converts http asset URLs to https. Add tags for URLs your theme or plugin outputs through other filters.

Parameters#

ParameterTypeDescription
$filtersstring[]Filter tag names such as script_loader_src and style_loader_src.

Return value#

string[]. List of filter tags to attach the https rewrite to.

Example#

function my_ssl_asset_filters( $filters ) {
	$filters[] = 'wp_get_attachment_image_src';
	return $filters;
}
add_filter( 'rpress_enforced_ssl_asset_filters', 'my_ssl_asset_filters', 10, 1 );

Source#

Applied in:

  • includes/checkout/functions.php (line 321), in rpress_enforced_ssl_asset_handler()

See also#

Was this page helpful?