WC_HTTPS::force_https_url
Force https for urls.
Method of the class: WC_HTTPS{}
No Hooks.
Returns
String.
Usage
$result = WC_HTTPS::force_https_url( $content );
- $content(mixed) (required)
- .
WC_HTTPS::force_https_url() WC HTTPS::force https url code WC 10.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;
}