Automattic\WooCommerce\StoreApi\Schemas\V1

CartSchema::__construct()publicWC 1.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код CartSchema::__construct() WC 6.8.0

public function __construct( ExtendSchema $extend, SchemaController $controller ) {
	parent::__construct( $extend, $controller );
	$this->item_schema             = $this->controller->get( CartItemSchema::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 );
}