refactor(2meet-data-optimizer-latepoint-addon): name the index table in uninstall.php
Tests / PHP Lint (pull_request) Successful in 4s
Tests / PHP Lint (pull_request) Successful in 4s
- 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
This commit is contained in:
+2
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user