﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
23069,"For plugins that create custom taxonomies, wp_delete_term does not work during plugin uninstall.",sscovil,,"I ran into this problem while writing a plugin uninstall class to clean up any options, custom post types, taxonomies & terms related to the plugin.

The problem is, if a plugin creates a custom taxonomy and the plugin user creates terms for that taxonomy, the plugin cannot delete those terms during uninstall.

How to reproduce:

1. Create a plugin that creates a custom taxonomy.
2. Create some terms for that taxonomy.
3. In uninstall.php, try using wp_delete_term to remove those terms.

Because the plugin is already deactivated by the time uninstall.php fires, $wp_taxonomies no longer contains the custom taxonomy that the plugin created. Since wp_delete_term requires a valid taxonomy as its second parameter, it does not work.

The issue is also being discussed here: http://bit.ly/RUDYOv",defect (bug),new,normal,Awaiting Review,Taxonomy,3.5,trivial,,,sscovil@…
