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/Sitemap/SitemapManager.php +9 -0 3.0.10 → 3.0.16 View file →
@@ -60,8 +60,17 @@
60 60 // Keep the cached URL list fresh on content changes.
61 61 foreach (['yatra_trip_created', 'yatra_trip_updated', 'yatra_trip_deleted'] as $hook) {
62 62 add_action($hook, [SitemapService::class, 'flushCache']);
63 63 }
64 +
65 + // ...and when the operator changes which types are published. Without
66 + // this the entry list is cached for an hour, so the setting would look
67 + // as though it had done nothing.
68 + foreach (['yatra_sitemap_types', 'yatra_enable_sitemap'] as $option) {
69 + add_action('update_option_' . $option, [SitemapService::class, 'flushCache']);
70 + add_action('add_option_' . $option, [SitemapService::class, 'flushCache']);
71 + add_action('delete_option_' . $option, [SitemapService::class, 'flushCache']);
72 + }
64 73 }
65 74
66 75 private static function registerActiveIntegration(
67 76 SitemapService $service,