Function __global->remove_from_cart
Definitions
sources/shopping.php
- Remove particular items from the cart.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $products_to_remove | array | No | No | required parameter | N/A | N/A | Products to remove |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member from which to remove products (null: current member if not guest, else does not filter by member) |
| $session_id | ?ID_TEXT | No | No | Null | N/A | N/A | The session from which to remove products (null: current session if guest, else does not filter by session) |
Preview
Code (PHP)
/**
* Remove particular items from the cart.
*
* @param array $products_to_remove Products to remove
* @param ?MEMBER $member_id The member from which to remove products (null: current member if not guest, else does not filter by member)
* @param ?ID_TEXT $session_id The session from which to remove products (null: current session if guest, else does not filter by session)
*/
function remove_from_cart(array $products_to_remove, ?int $member_id = null, ?string $session_id = null)
* Remove particular items from the cart.
*
* @param array $products_to_remove Products to remove
* @param ?MEMBER $member_id The member from which to remove products (null: current member if not guest, else does not filter by member)
* @param ?ID_TEXT $session_id The session from which to remove products (null: current session if guest, else does not filter by session)
*/
function remove_from_cart(array $products_to_remove, ?int $member_id = null, ?string $session_id = null)

