PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / trunk
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution vtrunk
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 +33 -5 1.5.21 → trunk 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
@@ -81,9 +83,9 @@
81 83 if (!isset($settings['can_not_cancel'])) {
82 84 $enabled = Arr::get($settings, 'can_cancel') == 'no' ? true : false;
83 85 $settings['can_not_cancel'] = [
84 86 'enabled' => $enabled,
85 - 'message' => 'Sorry! you can not cancel this',
87 + 'message' => 'Sorry! you cannot cancel this',
86 88 'type' => 'always',
87 89 'condition' => [
88 90 'unit' => 'minutes',
89 91 'value' => 30
@@ -94,9 +96,9 @@
94 96 if (!isset($settings['can_not_reschedule'])) {
95 97 $enabled = Arr::get($settings, 'can_reschedule') == 'no' ? true : false;
96 98 $settings['can_not_reschedule'] = [
97 99 'enabled' => $enabled,
98 - 'message' => 'Sorry! you can not reschedule this',
100 + 'message' => 'Sorry! you cannot reschedule this',
99 101 'type' => 'always',
100 102 'condition' => [
101 103 'unit' => 'minutes',
102 104 'value' => 30
@@ -141,10 +143,10 @@
141 143 return $settings;
142 144 }, 10, 1);
143 145
144 146 $app->addFilter('fluent_booking/admin_vars', function ($vars) {
145 - $vars['currency'] = CurrenciesHelper::getGlobalCurrency();
146 - $vars['currency_sign'] = CurrenciesHelper::getGlobalCurrencySign();
147 + $vars['currency_settings'] = CurrenciesHelper::getGlobalCurrencySettings();
148 + $vars['currency_sign'] = Arr::get($vars['currency_settings'], 'currency_sign');
147 149 return $vars;
148 150 });
149 151
150 152 $app->addFilter('fluent_booking/general_settings', function ($settings) {
@@ -165,5 +167,31 @@
165 167 if ($calendar->type != 'simple') {
166 168 $slotData['user_id'] = reset($slotData['settings']['team_members']);
167 169 }
168 170 return $slotData;
169 -}, 10, 2);
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 +}