Automattic\WooCommerce\StoreApi\Schemas\V1

CartSchema::__construct()publicWC 1.0

Constructor.

Method of the class: CartSchema{}

No Hooks.

Return

null. Nothing (null).

Usage

$CartSchema = new CartSchema();
$CartSchema->__construct( $extend, $controller );
$extend(ExtendSchema) (required)
Rest Extending instance.
$controller(SchemaController) (required)
Schema Controller instance.

CartSchema::__construct() code WC 8.6.1

public function __construct( ExtendSchema $extend, SchemaController $controller ) {
	parent::__construct( $extend, $controller );
	$this->item_schema             = $this->controller->get( CartItemSchema::IDENTIFIER );
	$this->cross_sells_item_schema = $this->controller->get( ProductSchema::IDENTIFIER );
	$this->coupon_schema           = $this->controller->get( CartCouponSchema::IDENTIFIER );
	$this->fee_schema              = $this->controller->get( CartFeeSchema::IDENTIFIER );
	$this->shipping_rate_schema    = $this->controller->get( CartShippingRateSchema::IDENTIFIER );
	$this->shipping_address_schema = $this->controller->get( ShippingAddressSchema::IDENTIFIER );
	$this->billing_address_schema  = $this->controller->get( BillingAddressSchema::IDENTIFIER );
	$this->error_schema            = $this->controller->get( ErrorSchema::IDENTIFIER );
}