PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.29
Booktics – Appointment Booking Calendar for Service Businesses v1.0.29
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
← All changes | base/models/customer-model.php +0 -26 1.0.0 → 1.0.29 View file →
@@ -61,31 +61,5 @@
61 61 */
62 62 public function get_email_attribute( $customer ) {
63 63 return $customer->email ?? $customer->user_email;
64 64 }
65 -
66 - /**
67 - * total booking attribute
68 - *
69 - * @param $customer
70 - *
71 - * @return int
72 - */
73 - public function get_total_booking_attribute( $customer ): int {
74 - $db = new Booktics_Database();
75 -
76 - return ( new Order_Model( $db ) )->count( [ 'customer_id' => $customer->id ] );
77 - }
78 -
79 - /**
80 - * Get total amount of all orders for a customer
81 - *
82 - * @param object $customer Customer object
83 - *
84 - * @return float Total amount of customer orders
85 - */
86 - public function get_total_amount_attribute( $customer ) {
87 - $db = new Booktics_Database();
88 -
89 - return ( new Order_Model( $db ) )->sum( 'total', [ 'customer_id' => $customer->id ] );
90 - }
91 65 }