| @@ -311,9 +311,9 @@ | ||
| 311 | 311 | url: ajaxurl, |
| 312 | 312 | method: 'POST', |
| 313 | 313 | data: { |
| 314 | 314 | action: 'get_woocommerce_categories', |
| 315 | - _wpnonce: '<?php echo wp_create_nonce('get_woocommerce_categories_nonce'); ?>' | |
| 315 | + _wpnonce: '<?php echo esc_attr(wp_create_nonce('get_woocommerce_categories_nonce')); ?>' | |
| 316 | 316 | }, |
| 317 | 317 | success: function(response) { |
| 318 | 318 | if (response.success) { |
| 319 | 319 | wooCategories = response.data; |
| @@ -333,9 +333,9 @@ | ||
| 333 | 333 | url: ajaxurl, |
| 334 | 334 | method: 'POST', |
| 335 | 335 | data: { |
| 336 | 336 | action: 'get_basalam_categories', |
| 337 | - _wpnonce: '<?php echo wp_create_nonce('get_basalam_categories_nonce'); ?>' | |
| 337 | + _wpnonce: '<?php echo esc_attr(wp_create_nonce('get_basalam_categories_nonce')); ?>' | |
| 338 | 338 | }, |
| 339 | 339 | success: function(response) { |
| 340 | 340 | if (response.success) { |
| 341 | 341 | basalamCategories = response.data; |
| @@ -355,9 +355,9 @@ | ||
| 355 | 355 | url: ajaxurl, |
| 356 | 356 | method: 'POST', |
| 357 | 357 | data: { |
| 358 | 358 | action: 'get_category_mappings', |
| 359 | - _wpnonce: '<?php echo wp_create_nonce('get_category_mappings_nonce'); ?>' | |
| 359 | + _wpnonce: '<?php echo esc_attr(wp_create_nonce('get_category_mappings_nonce')); ?>' | |
| 360 | 360 | }, |
| 361 | 361 | success: function(response) { |
| 362 | 362 | if (response.success) { |
| 363 | 363 | categoryMappings = response.data; |
| @@ -605,9 +605,9 @@ | ||
| 605 | 605 | woo_category_id: selectedWooCategory.id, |
| 606 | 606 | woo_category_name: selectedWooCategory.name, |
| 607 | 607 | basalam_category_ids: selectedBasalamCategory.path, |
| 608 | 608 | basalam_category_name: selectedBasalamCategory.name, |
| 609 | - _wpnonce: '<?php echo wp_create_nonce('create_category_mapping_nonce'); ?>' | |
| 609 | + _wpnonce: '<?php echo esc_attr(wp_create_nonce('create_category_mapping_nonce')); ?>' | |
| 610 | 610 | }, |
| 611 | 611 | success: function(response) { |
| 612 | 612 | if (response.success) { |
| 613 | 613 | window.BasalamToast.success('اتصال با موفقیت ایجاد شد!'); |
| @@ -629,9 +629,9 @@ | ||
| 629 | 629 | method: 'POST', |
| 630 | 630 | data: { |
| 631 | 631 | action: 'delete_category_mapping', |
| 632 | 632 | mapping_id: mappingId, |
| 633 | - _wpnonce: '<?php echo wp_create_nonce('delete_category_mapping_nonce'); ?>' | |
| 633 | + _wpnonce: '<?php echo esc_attr(wp_create_nonce('delete_category_mapping_nonce')); ?>' | |
| 634 | 634 | }, |
| 635 | 635 | success: function(response) { |
| 636 | 636 | if (response.success) { |
| 637 | 637 | window.BasalamToast.success('اتصال با موفقیت حذف شد!'); |