query( "DROP TABLE IF EXISTS {$wpdb->prefix}ymmhero_vehicle_products" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange -- plugin owns the ymmhero_vehicles/ymmhero_vehicle_products tables; there is no core API for them; results are cached in the YMMHERO_DB object-cache layer and invalidated by YMMHERO_DB::flush_cache(); schema change is the documented job of the activator/upgrade routine. $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}ymmhero_vehicles" ); // The meta mirrors the pivot and stores vehicle ids only. Left behind, a // reinstall + re-import backfills those ids into a table whose AUTO_INCREMENT // restarted at 1, mapping products to whichever vehicles now hold them. // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- plugin owns the ymmhero_vehicles/ymmhero_vehicle_products tables; there is no core API for them; results are cached in the YMMHERO_DB object-cache layer and invalidated by YMMHERO_DB::flush_cache(); runs once during uninstall, not on a request path. $wpdb->delete( $wpdb->postmeta, array( 'meta_key' => '_ymmhero_compatible_vehicles' ), array( '%s' ) ); delete_option( 'ymmhero_settings' ); delete_option( 'ymmhero_db_version' ); delete_option( 'ymmhero_onboarding' ); delete_transient( 'ymmhero_setup_widget_placed' ); // Keep in step with YMMHERO_DB::flush_cache(). delete_transient( 'ymmhero_makes' ); delete_transient( 'ymmhero_years' ); delete_transient( 'ymmhero_tree' ); delete_transient( 'ymmhero_assignment_rows' ); delete_transient( 'ymmhero_assignment_rows_v2' ); delete_transient( 'ymmhero_vehicle_picker_rows' );