woo_directives_evaluate()WC 1.0

Хуков нет.

Возвращает

null. Ничего.

Использование

woo_directives_evaluate( $path, $context );
$path(строка) (обязательный)
-
$context(массив)
-
По умолчанию: array()

Код woo_directives_evaluate() WC 7.7.2

function woo_directives_evaluate( string $path, array $context = array() ) {
	$current = array_merge(
		Woo_Directive_Store::get_data(),
		array( 'context' => $context )
	);

	$array = explode( '.', $path );
	foreach ( $array as $p ) {
		if ( isset( $current[ $p ] ) ) {
			$current = $current[ $p ];
		} else {
			return null;
		}
	}
	return $current;
}