Automattic\WooCommerce\Blueprint
ExportSchema::add_result_to_schema
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() ExportSchema::add result to schema WC 10.7.0
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();
}