Automattic\WooCommerce\StoreApi\Schemas\V1

CartSchema::__construct()publicWC 1.0

Constructor.

Метод класса: CartSchema{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$CartSchema = new CartSchema();
$CartSchema->__construct( $extend, $controller );
$extend(ExtendSchema) (обязательный)
Rest Extending instance.
$controller(SchemaController) (обязательный)
Schema Controller instance.

Код CartSchema::__construct() WC 8.7.0

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 );
}