wc_get_relative_url()
Make a URL relative, if possible.
No Hooks.
Return
String
.
Usage
wc_get_relative_url( $url );
- $url(string) (required)
- URL to make relative.
Changelog
Since 3.2.0 | Introduced. |
wc_get_relative_url() wc get relative url code WC 9.8.2
function wc_get_relative_url( $url ) { return wc_is_external_resource( $url ) ? $url : str_replace( array( 'http://', 'https://' ), '//', $url ); }