PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Hooks/AvailabilityInventoryHooks.php +1 -1 3.0.5 → 3.0.16 View file →
@@ -239,9 +239,9 @@
239 239 $date = $departure->start_date ?: $departure->date;
240 240
241 241 // Get capacity from availability
242 242 $capacityService = new CapacityService();
243 - $correctCapacity = $capacityService->getCapacityForDate($departure->trip_id, $date);
243 + $correctCapacity = $capacityService->getCapacityForDate($departure->trip_id, $date, $departure->time ?? null);
244 244
245 245 if ($correctCapacity > 0 && $departure->max_capacity !== $correctCapacity) {
246 246 // Remove hook temporarily to prevent infinite loop
247 247 remove_action('yatra_departure_saved', [self::class, 'onDepartureSave'], 10);