WC_HTTPS::force_https_url()public staticWC 1.0

Force https for urls.

Method of the class: WC_HTTPS{}

No Hooks.

Return

String.

Usage

$result = WC_HTTPS::force_https_url( $content );
$content(mixed) (required)
-

WC_HTTPS::force_https_url() code WC 8.7.0

public static function force_https_url( $content ) {
	if ( is_ssl() ) {
		if ( is_array( $content ) ) {
			$content = array_map( 'WC_HTTPS::force_https_url', $content );
		} else {
			$content = str_replace( 'http:', 'https:', (string) $content );
		}
	}
	return $content;
}