Automattic\WooCommerce\StoreApi\Schemas\V1

ErrorSchema::get_properties()publicWC 1.0

Product schema properties.

Method of the class: ErrorSchema{}

No Hooks.

Return

Array.

Usage

$ErrorSchema = new ErrorSchema();
$ErrorSchema->get_properties();

ErrorSchema::get_properties() code WC 8.7.0

public function get_properties() {
	return [
		'code'    => [
			'description' => __( 'Error code', 'woocommerce' ),
			'type'        => 'string',
			'context'     => [ 'view', 'edit' ],
			'readonly'    => true,
		],
		'message' => [
			'description' => __( 'Error message', 'woocommerce' ),
			'type'        => 'string',
			'context'     => [ 'view', 'edit' ],
			'readonly'    => true,
		],
	];
}