Automattic\WooCommerce\StoreApi\Routes\V1
AbstractCartRoute::__construct()
Constructor.
Метод класса: AbstractCartRoute{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$AbstractCartRoute = new AbstractCartRoute(); $AbstractCartRoute->__construct( $schema_controller, $schema );
- $schema_controller(SchemaController) (обязательный)
- Schema Controller instance.
- $schema(AbstractSchema) (обязательный)
- Schema class for this route.
Код AbstractCartRoute::__construct() AbstractCartRoute:: construct WC 9.6.0
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->additional_fields_controller = Package::container()->get( CheckoutFields::class ); $this->order_controller = new OrderController(); }