Automattic\WooCommerce\Blueprint\Schemas
JsonSchema::validate
Just makes sure that the JSON contains 'steps' field.
We're going to validate 'steps' later because we can't know the exact schema ahead of time. 3rd party plugins can add their step processors.
Method of the class: JsonSchema{}
No Hooks.
Returns
true|false[
.
Usage
$JsonSchema = new JsonSchema(); $JsonSchema->validate();
JsonSchema::validate() JsonSchema::validate code WC 9.9.5
public function validate() { if ( json_last_error() !== JSON_ERROR_NONE ) { return false; } if ( ! isset( $this->schema->steps ) || ! is_array( $this->schema->steps ) ) { return false; } return true; }