PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 2.5.0
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v2.5.0
2.5.0 2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 All 34 releases
← All changes | app/Hooks/filters.php +50 -4 1.5.0 → 2.5.0 View file →
@@ -1,6 +1,8 @@
1 1 <?php
2 2
3 +defined('ABSPATH') || exit;
4 +
3 5 use FluentBooking\Framework\Support\Arr;
4 6 use FluentBooking\App\Services\CurrenciesHelper;
5 7 use FluentBooking\App\Services\DateTimeHelper;
6 8
@@ -66,13 +68,24 @@
66 68 if (!isset($settings['booking_title'])) {
67 69 $settings['booking_title'] = '';
68 70 }
69 71
72 + if (!isset($settings['submit_button_text'])) {
73 + $settings['submit_button_text'] = '';
74 + }
75 +
76 + if (!isset($settings['multiple_booking'])) {
77 + $settings['multiple_booking'] = [
78 + 'enabled' => false,
79 + 'limit' => 5
80 + ];
81 + }
82 +
70 83 if (!isset($settings['can_not_cancel'])) {
71 84 $enabled = Arr::get($settings, 'can_cancel') == 'no' ? true : false;
72 85 $settings['can_not_cancel'] = [
73 86 'enabled' => $enabled,
74 - 'message' => 'Sorry! you can not cancel this',
87 + 'message' => 'Sorry! you cannot cancel this',
75 88 'type' => 'always',
76 89 'condition' => [
77 90 'unit' => 'minutes',
78 91 'value' => 30
@@ -83,9 +96,9 @@
83 96 if (!isset($settings['can_not_reschedule'])) {
84 97 $enabled = Arr::get($settings, 'can_reschedule') == 'no' ? true : false;
85 98 $settings['can_not_reschedule'] = [
86 99 'enabled' => $enabled,
87 - 'message' => 'Sorry! you can not reschedule this',
100 + 'message' => 'Sorry! you cannot reschedule this',
88 101 'type' => 'always',
89 102 'condition' => [
90 103 'unit' => 'minutes',
91 104 'value' => 30
@@ -130,10 +143,10 @@
130 143 return $settings;
131 144 }, 10, 1);
132 145
133 146 $app->addFilter('fluent_booking/admin_vars', function ($vars) {
134 - $vars['currency'] = CurrenciesHelper::getGlobalCurrency();
135 - $vars['currency_sign'] = CurrenciesHelper::getGlobalCurrencySign();
147 + $vars['currency_settings'] = CurrenciesHelper::getGlobalCurrencySettings();
148 + $vars['currency_sign'] = Arr::get($vars['currency_settings'], 'currency_sign');
136 149 return $vars;
137 150 });
138 151
139 152 $app->addFilter('fluent_booking/general_settings', function ($settings) {
@@ -148,4 +161,37 @@
148 161 }
149 162 }
150 163 return $eventVars;
151 164 }, 10, 1);
165 +
166 +$app->addFilter('fluent_booking/create_calendar_event_data', function ($slotData, $calendar) {
167 + if ($calendar->type != 'simple') {
168 + $slotData['user_id'] = reset($slotData['settings']['team_members']);
169 + }
170 + return $slotData;
171 +}, 10, 2);
172 +
173 +$app->addFilter('wp_plugin_check_ignore_directories', function ($dirs){
174 + $dirs[] = 'app/Services/Libs';
175 + return $dirs;
176 +});
177 +
178 +if (!defined('FLUENT_BOOKING_PRO_DIR_FILE')) {
179 + $app->addFilter('fluent_booking/payment/get_all_methods', function () {
180 + $methods['stripe'] = [
181 + 'title' => __('Stripe', 'fluent-booking'),
182 + 'image' => '',
183 + 'status' => false
184 + ];
185 + $methods['paypal'] = [
186 + 'title' => __('Paypal', 'fluent-booking'),
187 + 'image' => '',
188 + 'status' => false
189 + ];
190 + $methods['offline'] = [
191 + 'title' => __('Offline Payment', 'fluent-booking'),
192 + 'image' => '',
193 + 'status' => false
194 + ];
195 + return $methods;
196 + });
197 +}