PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.21
ووسلام – همگام سازی ووکامرس و باسلام v1.10.21
1.10.21 1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 All 54 releases
← All changes | includes/Migrations/Versions/Migration_1_6_2.php +5 -0 1.9.11.10.21 View file →
@@ -12,8 +12,9 @@
12 12 {
13 13 global $wpdb;
14 14 $tableName = $wpdb->prefix . 'sync_basalam_category_mappings';
15 15
16 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Custom plugin table; identifier from $wpdb->prefix, not user input.
16 17 $oldDataExists = $wpdb->get_var("SHOW COLUMNS FROM $tableName LIKE 'basalam_category_id'");
17 18
18 19 if (!$oldDataExists) return;
19 20
@@ -23,8 +24,9 @@
23 24 }
24 25
25 26 private function addNewColumns($wpdb, $tableName)
26 27 {
28 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Migration schema change on own plugin table; identifier from $wpdb->prefix, not user input.
27 29 $wpdb->query("ALTER TABLE $tableName
28 30 ADD COLUMN basalam_category_level1 INT(11) DEFAULT NULL AFTER woo_category_name,
29 31 ADD COLUMN basalam_category_level2 INT(11) DEFAULT NULL AFTER basalam_category_level1,
30 32 ADD COLUMN basalam_category_level3 INT(11) DEFAULT NULL AFTER basalam_category_level2
@@ -29,8 +31,9 @@
29 31 ADD COLUMN basalam_category_level2 INT(11) DEFAULT NULL AFTER basalam_category_level1,
30 32 ADD COLUMN basalam_category_level3 INT(11) DEFAULT NULL AFTER basalam_category_level2
31 33 ");
32 34
35 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Migration schema change on own plugin table; identifier from $wpdb->prefix, not user input.
33 36 $wpdb->query("ALTER TABLE $tableName
34 37 ADD INDEX basalam_category_level1_idx (basalam_category_level1)
35 38 ");
36 39 }
@@ -36,8 +39,10 @@
36 39 }
37 40
38 41 private function removeOldColumn($wpdb, $tableName)
39 42 {
43 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Migration schema change on own plugin table; identifier from $wpdb->prefix, not user input.
40 44 $wpdb->query("ALTER TABLE $tableName DROP INDEX basalam_category_idx");
45 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Migration schema change on own plugin table; identifier from $wpdb->prefix, not user input.
41 46 $wpdb->query("ALTER TABLE $tableName DROP COLUMN basalam_category_id");
42 47 }
43 48 }