Automattic\WooCommerce\StoreApi\Schemas\V1
CartSchema::__construct
Constructor.
Method of the class: CartSchema{}
No Hooks.
Returns
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() CartSchema:: construct code WC 10.3.6
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 );
}