Automattic\WooCommerce\StoreApi\Schemas\V1

PatternsSchema{}WC 1.0

OrderSchema class.

No Hooks.

Usage

$PatternsSchema = new PatternsSchema();
// use class methods

Methods

  1. public get_item_response( $item )
  2. ERROR: no method name found on line `}`
  3. public get_properties()
  4. ERROR: no method name found on line `/**`

PatternsSchema{} code WC 9.2.3

class PatternsSchema extends AbstractSchema {
	/**
	 * The schema item name.
	 *
	 * @var string
	 */
	protected $title = 'patterns';

	/**
	 * The schema item identifier.
	 *
	 * @var string
	 */
	const IDENTIFIER = 'patterns';

	/**
	 * Patterns schema properties.
	 *
	 * @return array
	 */
	public function get_properties() {
		return [];
	}

	/**
	 * Get the Patterns response.
	 *
	 * @param array $item Item to get response for.
	 *
	 * @return array
	 */
	public function get_item_response( $item ) {
		return [
			'success' => true,
		];
	}
}