wc_get_relative_url( string $url )
Make a URL relative, if possible.
Description Description
Parameters Parameters
- $url
-
(Required) URL to make relative.
Return Return
(string)
Source Source
File: includes/wc-core-functions.php
function wc_get_relative_url( $url ) { return wc_is_external_resource( $url ) ? $url : str_replace( array( 'http://', 'https://' ), '//', $url ); }
Changelog Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |