Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete taxonomy data on plugin deletion #1419

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

alexsanford
Copy link
Contributor

@alexsanford alexsanford commented Apr 4, 2018

Contributes to #1362

This PR deletes all taxonomy data: term meta, terms, term taxonomies, and term relationships.

Note that this data is deleted directly from the database and this cannot be undone! I've aimed to make this code simple, with some key automated tests, so we don't inadvertently delete data that we shouldn't. We should make sure to test it carefully.

Note: this builds upon #1418 and so the first commit (which is shared) should be ignored. After #1418 is merged, this will be rebased.

Testing

  • First, you may want to back up your data, or copy it to a fresh WordPress installation.

  • Ensure that the tests pass.

  • Enable Job Listing Categories and Tags, and apply some Categories and Tags to your Job Listings.

  • Delete the WP Job Manager plugin.

  • Look at your Job Categories and Job Types, and taxonomies from other plugins. Ensure they have not been deleted.

  • Inspect the database. All items in the termmeta, terms, term_relationships and term_taxonomy tables that were related to the WP Job Manager taxonomies (Job Listing Categories and Types) should be removed.

  • Please also test on a multisite installation. When the plugin is deleted from the Network Admin, the data should be deleted across all sites.

@alexsanford alexsanford self-assigned this Apr 4, 2018
@alexsanford alexsanford requested review from jom and donnapep April 4, 2018 16:18
@alexsanford alexsanford changed the title Add/data deletion taxonomies Delete taxonomy data on plugin deletion Apr 4, 2018
Copy link
Member

@jom jom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear Right Honourable Mr. Alex,

This PR looks good to me.

Best,

Jake

@jom jom added this to the 1.31.0 milestone Apr 6, 2018
@alexsanford alexsanford force-pushed the add/data-deletion-taxonomies branch from 8ae4af2 to 185a7e5 Compare April 6, 2018 17:37
@alexsanford alexsanford merged commit f2c8aa0 into master Apr 6, 2018
@alexsanford alexsanford deleted the add/data-deletion-taxonomies branch April 6, 2018 17:41
@jom jom mentioned this pull request Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants