Automattic\WooCommerce\EmailEditor\Validator
Schema::to_string
Returns the schema as a JSON string.
Метод класса: Schema{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Schema = new Schema(); $Schema->to_string(): string;
Код Schema::to_string() Schema::to string WC 11.3.0
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;
}