Automattic\WooCommerce\Blueprint\Steps
RunSql::get_schema
Returns the schema for the JSON representation of this step.
Method of the class: RunSql{}
No Hooks.
Returns
Array
. The schema array.
Usage
$result = RunSql::get_schema( $version ): array;
- $version(int)
- The version of the schema to return.
Default: 1
RunSql::get_schema() RunSql::get schema code WC 9.9.5
public static function get_schema( int $version = 1 ): array { return array( 'type' => 'object', 'properties' => array( 'step' => array( 'type' => 'string', 'enum' => array( static::get_step_name() ), ), 'sql' => array( 'type' => 'object', 'required' => array( 'contents', 'resource', 'name' ), 'properties' => array( 'resource' => array( 'type' => 'string', 'enum' => array( 'literal' ), ), 'name' => array( 'type' => 'string', ), 'contents' => array( 'type' => 'string', ), ), ), ), 'required' => array( 'step', 'sql' ), ); }