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 7.5.1

public function __construct( SchemaController $schema_controller, AbstractSchema $schema ) {
	parent::__construct( $schema_controller, $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();
}