• Within the uninstall.php file, replace the wpbitly_uninstall() with the following code:

    To the plugin author: please add this fix. I cannot see a public repository for me to contribute. Thank you.

    /**
     *
     * @return void
     */
    function wpbitly_uninstall() {
        // Delete associated options
        if (defined('WPBITLY_OPTIONS') && constant('WPBITLY_OPTIONS')) {
            delete_option(constant('WPBITLY_OPTIONS'));
        }
    
        if (defined('WPBITLY_AUTHORIZED') && constant('WPBITLY_AUTHORIZED')) {
            delete_option(constant('WPBITLY_AUTHORIZED'));
        }
    
        // Grab all posts with an attached shortlink
        $posts = get_posts('numberposts=-1&post_type=any&meta_key=_wpbitly');
    
        // And remove our meta information from them
        foreach ($posts as $post){
            delete_post_meta($post->ID, '_wpbitly');
        }
    
    }
    wpbitly_uninstall();

    You can then proceed to uninstall safely.

    Kind regards,
    Michael

Viewing 2 replies - 1 through 2 (of 2 total)
  • Lars

    (@thelogbookwebsite)

    Thank you Michael!

    With the above I was finally able to get rid of this cr*p plugin that never worked.

    Thread Starter Michael Sumner

    (@xmic)

    Glad it worked for you!

    It’s difficult when you want to uninstall the plugin but unable to do so due to a fatal error in the uninstallation hook.

    Hope this helps more people until the fix is made. It seems the plugin support has not been updating for a while now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uninstall issue [Fix provided]’ is closed to new replies.