wc_untokenize_path( string $path, array $path_tokens )

Given a tokenized path, this will expand the tokens to their full path.

Description Description

Parameters Parameters


(Required) The absolute path to expand.


(Required) An array keyed with the token, containing paths that should be expanded.

Top ↑

Return Return

(string) The absolute path.

Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_untokenize_path( $path, $path_tokens ) {
	foreach ( $path_tokens as $token => $token_path ) {
		$path = str_replace( '{{' . $token . '}}', $token_path, $path );

	return $path;

Top ↑

Changelog Changelog

Version Description
4.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.