Cart::get_repository()
Gets the current instance of cart handling that we are using.
Most of the pieces should be handled in the Repository for the cart, only piece fully handled by the parent class is the cookie handling.
Return
(TECTicketsCommerceCartCart_Interface)
Source
File: src/Tickets/Commerce/Cart.php
public function get_repository() {
$default_cart = tribe( Cart\Unmanaged_Cart::class );
/**
* Filters the cart repository, by default we use Unmanaged Cart.
*
* @since 5.1.9
*
* @param Cart\Cart_Interface $cart Instance of the cart repository managing the cart.
*/
return apply_filters( 'tec_tickets_commerce_cart_repository', $default_cart );
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |