| @@ -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 | +} | |