WordPress at Your Fingertips
function is not described

WC_HTTPS::force_https_url() public WC 1.0

Force https for urls.

{} It's a method of the class: WC_HTTPS{}

No Hooks.

Return

String.

Usage

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

Code of WC_HTTPS::force_https_url() WC 5.9.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:', $content );
		}
	}
	return $content;
}