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/Ajax/DiscountShortcodeAjax.php +3 -11 3.0.2.6 → 3.0.16 View file →
@@ -20,18 +20,13 @@
20 20 * Load trips via AJAX for pagination (same as regular trips)
21 21 */
22 22 public function loadTrips(): void
23 23 {
24 - // Debug: Log AJAX request
25 - if (defined('WP_DEBUG') && WP_DEBUG) {
26 - error_log('Yatra Discount AJAX - Request received: ' . print_r($_POST, true));
27 - }
24 +
28 25
29 26 // Verify nonce
30 27 if (!wp_verify_nonce($_POST['nonce'] ?? '', 'yatra_trip_shortcode_nonce')) {
31 - if (defined('WP_DEBUG') && WP_DEBUG) {
32 - error_log('Yatra Discount AJAX - Security check failed');
33 - }
28 +
34 29 wp_die(esc_html__('Security check failed', 'yatra'), '', ['response' => 403]);
35 30 }
36 31
37 32 // Parse shortcode attributes
@@ -75,12 +70,9 @@
75 70 'total_found' => $total_found,
76 71 ]);
77 72
78 73 } catch (\Exception $e) {
79 - // Debug: Log error
80 - if (defined('WP_DEBUG') && WP_DEBUG) {
81 - error_log('Yatra Discount AJAX Error: ' . $e->getMessage());
82 - }
74 +
83 75
84 76 wp_send_json_error([
85 77 'message' => (defined('WP_DEBUG') && WP_DEBUG)
86 78 ? 'Error loading discount trips: ' . $e->getMessage()