delete_user_meta : how to delete all the metadata of a given user (witout SQL)
Yes, it does delete the usermeta. Here’s the code it uses: $meta = $wpdb->get_col( $wpdb->prepare( “SELECT umeta_id FROM $wpdb->usermeta WHERE user_id = %d”, $id ) ); foreach ( $meta as $mid ) delete_metadata_by_mid( ‘user’, $mid ); There’s identical code in wp_delete_user (for the non-multisite case) and they use the same pattern for deleting taxonomy metadata, … Read more