Automattic\WooCommerce\Blueprint

ExportSchema::add_result_to_schemaprivateWC 1.0

Add export result to the schema array.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->add_result_to_schema( $schema, $step ): void;
$schema(массив) (обязательный)
Schema array to add steps to.
$step(массив|Step) (обязательный)
Step or array of steps to add.

Код ExportSchema::add_result_to_schema() WC 9.9.5

private function add_result_to_schema( array &$schema, $step ): void {
	if ( is_array( $step ) ) {
		foreach ( $step as $_step ) {
			$schema['steps'][] = $_step->get_json_array();
		}
		return;
	}

	$schema['steps'][] = $step->get_json_array();
}