| @@ -150,9 +150,9 @@ | ||
| 150 | 150 | theme_slug: themeSlug, |
| 151 | 151 | nonce: '<?php echo wp_create_nonce('yatra_theme_actions'); ?>' |
| 152 | 152 | }, |
| 153 | 153 | success: function(response) { |
| 154 | - console.log('Raw installation response:', response); // Debug log | |
| 154 | + window.YATRA_DEBUG && console.log('Raw installation response:', response); // Debug log | |
| 155 | 155 | |
| 156 | 156 | // Handle case where HTML is mixed with JSON |
| 157 | 157 | let jsonResponse = response; |
| 158 | 158 | if (typeof response === 'string' && response.includes('{')) { |
| @@ -183,9 +183,9 @@ | ||
| 183 | 183 | theme_slug: themeSlug, |
| 184 | 184 | nonce: '<?php echo wp_create_nonce('yatra_theme_actions'); ?>' |
| 185 | 185 | }, |
| 186 | 186 | success: function(activateResponse) { |
| 187 | - console.log('Activation response:', activateResponse); // Debug log | |
| 187 | + window.YATRA_DEBUG && console.log('Activation response:', activateResponse); // Debug log | |
| 188 | 188 | if (activateResponse && activateResponse.success) { |
| 189 | 189 | // Update UI dynamically to show activated state |
| 190 | 190 | updateThemeCardToActivated(); |
| 191 | 191 | } else { |
| @@ -194,9 +194,9 @@ | ||
| 194 | 194 | alert(yatraThemeWizardI18n.activationFailedPrefix + ' ' + errorMsg); |
| 195 | 195 | } |
| 196 | 196 | }, |
| 197 | 197 | error: function(xhr, status, error) { |
| 198 | - console.log('Activation AJAX error:', {xhr: xhr, status: status, error: error}); // Debug log | |
| 198 | + window.YATRA_DEBUG && console.log('Activation AJAX error:', {xhr: xhr, status: status, error: error}); // Debug log | |
| 199 | 199 | resetButtonState(button, originalContent); |
| 200 | 200 | alert(yatraThemeWizardI18n.activationRequestFailed); |
| 201 | 201 | } |
| 202 | 202 | }); |
| @@ -247,9 +247,9 @@ | ||
| 247 | 247 | theme_slug: themeSlug, |
| 248 | 248 | nonce: '<?php echo wp_create_nonce('yatra_theme_actions'); ?>' |
| 249 | 249 | }, |
| 250 | 250 | success: function(response) { |
| 251 | - console.log('Activation response:', response); // Debug log | |
| 251 | + window.YATRA_DEBUG && console.log('Activation response:', response); // Debug log | |
| 252 | 252 | if (response && response.success) { |
| 253 | 253 | // Update UI dynamically to show activated state |
| 254 | 254 | updateThemeCardToActivated(); |
| 255 | 255 | } else { |
| @@ -258,9 +258,9 @@ | ||
| 258 | 258 | alert(yatraThemeWizardI18n.activationFailedPrefix + ' ' + errorMsg); |
| 259 | 259 | } |
| 260 | 260 | }, |
| 261 | 261 | error: function(xhr, status, error) { |
| 262 | - console.log('Activation AJAX error:', {xhr: xhr, status: status, error: error}); // Debug log | |
| 262 | + window.YATRA_DEBUG && console.log('Activation AJAX error:', {xhr: xhr, status: status, error: error}); // Debug log | |
| 263 | 263 | resetButtonState(button, originalContent); |
| 264 | 264 | alert(yatraThemeWizardI18n.activationRequestFailed); |
| 265 | 265 | } |
| 266 | 266 | }); |