Automattic\WooCommerce\Blueprint

ClassExtractor::replace_method_variable │ public │ WC 1.0

Replaces a variable inside a method with a new value.

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

Хуков нет.

Возвращает

$this.

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

$ClassExtractor = new ClassExtractor();
$ClassExtractor->replace_method_variable( $method_name, $variable_name, $new_value );
$method_name(строка) (обязательный)
Name of the method.
$variable_name(строка) (обязательный)
Name of the variable to replace.
$new_value(разное) (обязательный)
The new value to assign to the variable.

Код ClassExtractor::replace_method_variable() WC 11.3.0

public function replace_method_variable( $method_name, $variable_name, $new_value ) {
	$this->method_variable_replacements[] = array(
		'method'   => $method_name,
		'variable' => $variable_name,
		'value'    => $new_value,
	);
	return $this;
}