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/Handlers/DataImporter.php +4 -2 2.2.5 → 2.5.0 View file →
@@ -15,9 +15,9 @@
15 15 'message' => __('Security check failed. Please refresh and try again.', 'fluent-booking'),
16 16 ]);
17 17 }
18 18
19 - if (!PermissionManager::userCan(['invite_team_members', 'manage_all_data', 'manage_other_calendars'])) {
19 + if (!PermissionManager::userCan(['manage_all_data', 'manage_other_calendars'])) {
20 20 wp_send_json_error([
21 21 'message' => __('You are not authorized to import calendar', 'fluent-booking'),
22 22 ]);
23 23 }
@@ -49,9 +49,11 @@
49 49 'message' => __('Invalid file. Please provide a valid JSON file', 'fluent-booking'),
50 50 ]);
51 51 }
52 52
53 - $calendar = CalendarService::createCalendar($calendarData, false, true);
53 + $useCurrentUser = !PermissionManager::userCan('manage_all_data');
54 +
55 + $calendar = CalendarService::createCalendar($calendarData, $useCurrentUser, true);
54 56
55 57 if (is_wp_error($calendar)) {
56 58 wp_send_json_error([
57 59 'message' => $calendar->get_error_message(),