PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.13
Booktics – Appointment Booking Calendar for Service Businesses v1.0.13
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
booktics / core / cart / cart-service-provider.php

cart-service-provider.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.13, at core/cart/cart-service-provider.php

43 lines 905 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Booktics\Cart;
4
5 use Booktics\Cart\Controllers\Cart_Controller;
6 use Booktics\Providers\Base_Service_Provider;
7
8 /**
9 * Customer_Service_Provider will be responsible for all customer services
10 *
11 * @package Booktics/Customer
12 */
13 class Cart_Service_Provider extends Base_Service_Provider {
14 /**
15 * Store services
16 *
17 * @var array
18 */
19 protected $services = array(
20 Cart_Controller::class,
21 );
22
23 /**
24 * Register services
25 *
26 * @return void
27 */
28 public function get_services() {
29 add_action( 'clear_auth_cookie', array( $this, 'clear_booktics_cart_on_logout' ) );
30
31 return apply_filters( 'booktics_cart_services', $this->services );
32 }
33
34 /**
35 * Clear cart on logout
36 *
37 * @return void
38 */
39 public function clear_booktics_cart_on_logout() {
40 ( new Cart_Manager() )->remove_cart_item();
41 }
42 }
43