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

Problem table after delete plugin #86

Open
NicolasKulka opened this issue Nov 28, 2018 · 3 comments
Open

Problem table after delete plugin #86

NicolasKulka opened this issue Nov 28, 2018 · 3 comments
Assignees

Comments

@NicolasKulka
Copy link

When removing the plugin, it remains the plugin table in database.

@MaximeCulea MaximeCulea self-assigned this Nov 28, 2018
@MaximeCulea
Copy link
Contributor

Hello @NicolasKulka,

Thank you for the report 😄

Normally it should do the trick : https://github.com/BeAPI/bea-media-analytics/blob/master/classes/plugin.php#L27

Are you on multisite ?

Thx

@NicolasKulka
Copy link
Author

No, single site.

This function delete row in table for blog_id => 1

But doesn't have this : "register_uninstall_hook" and

"global $wpdb;
$table_name = $wpdb->prefix . 'bea_media_analytics';
$sql = "DROP TABLE IF EXISTS $table_name";
$wpdb->query($sql);"

@MaximeCulea
Copy link
Contributor

Ok thx, got it, duly noted for todo.

When the plugin is deleted, add a process on the register_uninstall_hook to delete the table's structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants