| @@ -46,21 +46,8 @@ | ||
| 46 | 46 | if (!wp_next_scheduled('fluent_support_weekly_tasks')) { |
| 47 | 47 | wp_schedule_event(time(), 'weekly', 'fluent_support_weekly_tasks'); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - global $wpdb; | |
| 51 | - $table = esc_sql($wpdb->prefix . 'fs_tickets'); | |
| 52 | - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $table is sanitized via esc_sql(); no user input. | |
| 53 | - $column_exists = $wpdb->get_var("SHOW COLUMNS FROM `{$table}` LIKE 'serial_number'"); | |
| 54 | - if ($column_exists) { | |
| 55 | - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared | |
| 56 | - $has_null = $wpdb->get_var("SELECT id FROM `{$table}` WHERE `serial_number` IS NULL LIMIT 1"); | |
| 57 | - if ($has_null) { | |
| 58 | - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared | |
| 59 | - $wpdb->query("UPDATE `{$table}` SET `serial_number` = `id` WHERE `serial_number` IS NULL"); | |
| 60 | - } | |
| 61 | - } | |
| 62 | - | |
| 63 | 50 | /* |
| 64 | 51 | * The below schedule is powered by Action Scheduler by WooCommerce |
| 65 | 52 | * It will run every 30 minutes. |
| 66 | 53 | */ |