query( "DELETE FROM {$wpdb->postmeta} WHERE meta_key = '_idrivee2_last_upload'" ); // Delete all _idrivee2_s3_base_url post meta. $wpdb->query( "DELETE FROM {$wpdb->postmeta} WHERE meta_key = '_idrivee2_s3_base_url'" ); // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching // Delete the deletion queue option. delete_option( 'idrivee2_deletion_queue' ); // Unschedule the cleanup cron event. $timestamp = wp_next_scheduled( 'idrivee2_cleanup_local_files' ); if ( $timestamp ) { wp_unschedule_event( $timestamp, 'idrivee2_cleanup_local_files' ); } // Clear all hooks for this action to prevent any remaining schedules. wp_clear_scheduled_hook( 'idrivee2_cleanup_local_files' ); /** * Note: Files uploaded to S3 are NOT deleted by this uninstall script. * If you want to delete files from S3, you must do so manually using * your S3 management console or AWS CLI. * * Local files in wp-content/uploads/ are also NOT deleted, as they are * part of WordPress's standard media library structure. */