Automattic\WooCommerce\StoreApi\Routes\V1
AbstractCartRoute::__construct()
Constructor.
Method of the class: AbstractCartRoute{}
No Hooks.
Return
null
. Nothing (null).
Usage
$AbstractCartRoute = new AbstractCartRoute(); $AbstractCartRoute->__construct( $schema_controller, $schema );
- $schema_controller(SchemaController) (required)
- Schema Controller instance.
- $schema(AbstractSchema) (required)
- Schema class for this route.
AbstractCartRoute::__construct() AbstractCartRoute:: construct code WC 8.7.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(); }