Automattic\WooCommerce\Blueprint\Schemas

JsonSchema::get_step │ public │ WC 1.0

Returns steps by name.

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

Хуков нет.

Возвращает

array.

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

$JsonSchema = new JsonSchema();
$JsonSchema->get_step( $name );
$name(строка) (обязательный)
The name of the step.

Код JsonSchema::get_step() WC 11.2.1

public function get_step( $name ) {
	$steps = array();
	foreach ( $this->schema->steps as $step ) {
		if ( $step->step === $name ) {
			$steps[] = $step;
		}
	}

	return $steps;
}