query( $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_key = %s", '_aatb_score' ) ); /* If membership tokens were stored per user for this plugin, clean them up too. */ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- one-time uninstall cleanup, caching is not applicable. $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->usermeta} WHERE meta_key = %s", 'ai-alt-text-builder_membership_tokens' ) ); /* Clean up any bulk job transients that might be lingering. */ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- one-time uninstall cleanup, caching is not applicable. $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_aatb_job_' ) . '%', $wpdb->esc_like( '_transient_timeout_aatb_job_' ) . '%' ) ); /* Note: We deliberately do not touch core/third-party fields like _wp_attachment_image_alt. */