From d6258eeb00df7a518a5666906963b0b0c59d4a35 Mon Sep 17 00:00:00 2001 From: wpdev Date: Sat, 26 Sep 2026 21:55:19 +0800 Subject: [PATCH] refactor(2meet-data-optimizer-latepoint-addon): name the index table in uninstall.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Build the table name as $wpdb->prefix . 'hpct_latepoint_idx' like the installer does, so the package check (§10) can match the DROP to the CREATE - Verify: php -l; package-plugin.sh §10 --- uninstall.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uninstall.php b/uninstall.php index 6e58c0d..a02a3af 100644 --- a/uninstall.php +++ b/uninstall.php @@ -20,7 +20,8 @@ foreach ( $tmdo_latepoint_blogs as $tmdo_latepoint_blog ) { if ( is_multisite() ) { switch_to_blog( $tmdo_latepoint_blog ); } - $wpdb->query( 'DROP TABLE IF EXISTS `' . $wpdb->prefix . 'hpct_latepoint_idx`' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange + $tmdo_latepoint_table = $wpdb->prefix . 'hpct_latepoint_idx'; + $wpdb->query( "DROP TABLE IF EXISTS `{$tmdo_latepoint_table}`" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange delete_option( 'tmdo_latepoint_db_version' ); if ( is_multisite() ) { restore_current_blog(); -- 2.43.0