Automattic\WooCommerce\Blueprint

ExportSchema::add_result_to_schemaprivateWC 1.0

Add export result to the schema array.

Method of the class: ExportSchema{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->add_result_to_schema( $schema, $step ): void;
$schema(array) (required)
Schema array to add steps to.
$step(array|Step) (required)
Step or array of steps to add.

ExportSchema::add_result_to_schema() code 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();
}