after_uninstall never called
Closed this issue · 8 comments
hi
when is the after_uninstall called ? because on delete is never called and i could not find any documentation
As you can see is called and the file is included in the main php file, https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/search?utf8=%E2%9C%93&q=PN_Uninstall.php
the file is called but the action not
Looking at the code seems that the hook is not the best way: https://developer.wordpress.org/plugins/the-basics/uninstall-methods/
Can you test if:
add_action( 'after_uninstall', array( $this, 'uninstall_hook' ) );
Replaced with:
register_uninstall_hook(__FILE__, array( $this, 'uninstall_hook' ));
Will work?
nope no luck
So the only solution is an uninstall.php
file or put this call in the main root file.
Did you close the ticket because now is working?
no. i just didn't see the point in keeping it open
Well the boilerplate keep to have the problem so I can also open a new ticket about reimplement an uninstall system (that works).