Automattic\WooCommerce\Internal\Utilities

URL::get_path()publicWC 1.0

Outputs the path. Especially useful if it was a a regular filepath that was passed in originally.

Метод класса: URL{}

No Hooks.

Return

String.

Usage

$URL = new URL();
$URL->get_path( $path_override ): string;
$path_override(string)
If provided this will be used as the URL path. Does not impact drive letter.
Default: null

Code of URL::get_path() WC 7.1.0

public function get_path( string $path_override = null ): string {
	return ( $this->components['drive'] ? $this->components['drive'] . ':' : '' ) . ( $path_override ?? $this->components['path'] );
}