WooCommerce Code Reference

Step
in package

Abstract class Step

This class defines the structure for a Step that requires arguments to perform an action. You can think it as a function described in JSON format.

A Step should also be capable of returning formatted data that can be imported later. Additionally, a Step can validate data.

Table of Contents

$meta_values  : array<string|int, mixed>
Meta values for the step.
get_json_array()  : mixed
Get the JSON array for the step.
get_schema()  : array<string|int, mixed>
Get the schema for this step.
get_step_name()  : string
Get the step name.
prepare_json_array()  : array<string|int, mixed>
Prepare the JSON array for this step.
set_meta_values()  : void
Set meta values for the step.

Properties

Methods

get_schema()

Get the schema for this step.

public abstract static get_schema([int $version = 1 ]) : array<string|int, mixed>
Parameters
$version : int = 1

The schema version.

Return values
array<string|int, mixed>

prepare_json_array()

Prepare the JSON array for this step.

public abstract prepare_json_array() : array<string|int, mixed>
Return values
array<string|int, mixed>The JSON array for the step.

set_meta_values()

Set meta values for the step.

public set_meta_values(array<string|int, mixed> $meta_values) : void
Parameters
$meta_values : array<string|int, mixed>

The meta values.

Return values
void