Automattic\WooCommerce\StoreApi\Routes\V1

AbstractCartRoute::__construct()publicWC 1.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего.

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

$AbstractCartRoute = new AbstractCartRoute();
$AbstractCartRoute->__construct( $schema_controller, $schema );
$schema_controller(SchemaController) (обязательный)
Schema Controller instance.
$schema(AbstractSchema) (обязательный)
Schema class for this route.

Код AbstractCartRoute::__construct() WC 6.9.4

public function __construct( SchemaController $schema_controller, AbstractSchema $schema ) {
	$this->schema_controller = $schema_controller;
	$this->schema            = $schema;
	$this->cart_schema       = $this->schema_controller->get( CartSchema::IDENTIFIER );
	$this->cart_item_schema  = $this->schema_controller->get( CartItemSchema::IDENTIFIER );
	$this->cart_controller   = new CartController();
	$this->order_controller  = new OrderController();
}