Automattic\WooCommerce\EmailEditor\Validator
Schema::to_string
Returns the schema as a JSON string.
Method of the class: Schema{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Schema = new Schema(); $Schema->to_string(): string;
Schema::to_string() Schema::to string code WC 10.3.5
public function to_string(): string {
$json = wp_json_encode( $this->schema, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRESERVE_ZERO_FRACTION );
$error = json_last_error();
if ( $error || false === $json ) {
throw new \Exception( \esc_html( json_last_error_msg() ), 0 );
}
return $json;
}