Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors\Transformers

DotNotation::transformpublicWC 1.0

Find given path from the given value.

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

Хуков нет.

Возвращает

Разное.

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

$DotNotation = new DotNotation();
$DotNotation->transform( $value, ?stdclass $arguments, $default_value );
$value(разное) (обязательный)
a value to transform.
?stdclass $arguments
.
По умолчанию: null
$default_value(строка|null)
default value.
По умолчанию: null

Код DotNotation::transform() WC 9.9.4

public function transform( $value, ?stdclass $arguments = null, $default_value = null ) {
	if ( is_object( $value ) ) {
		// if the value is an object, convert it to an array.
		$value = json_decode( wp_json_encode( $value ), true );
	}

	return $this->get( $value, $arguments->path, $default_value );
}