AbstractCartRoute::__construct( AutomatticWooCommerceBlocksStoreApiSchemasCartSchema $cart_schema, AutomatticWooCommerceBlocksStoreApiSchemasAbstractSchema $item_schema = null, AutomatticWooCommerceBlocksStoreApiUtilitiesCartController $cart_controller )

Constructor accepts two types of schema; one for the item being returned, and one for the cart as a whole. These may be the same depending on the route.


Description Description


Parameters Parameters

$cart_schema

(Required) Schema class for the cart.

$item_schema

(Optional) Schema class for this route's items if it differs from the cart schema.

Default value: null

$cart_controller

(Required) Cart controller class.


Top ↑

Source Source

File: packages/woocommerce-blocks/src/StoreApi/Routes/AbstractCartRoute.php



Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.