• Hello, I’m writing a plugin and I was wondering if there was a way to abort an upgrade to the plugin if an error occurred. I’m using the upgrader_pre_install and upgrader_post_install filter to do some work during the update (saving important user-uploaded files to a temporary directory) that would normally get deleted when WordPress updates the plugin.

    Is there a way to abort the plugin upgrade process in the upgrader_post_install filter? Or is there a different way I might be able to handle this case?

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

    (@rw1)

    hello,

    just wondering if you managed to find a solution for creating a plugin that doesn’t overwrite custom folders and files within the plugin folder upon plugin upgrade?

    thanks very much.

    Thread Starter dwieeb

    (@dwieeb)

    Well, instead of using a directory in the plugin folder, I just have another directory made in the ‘wp-content’ folder. That way you don’t have to mess with this hook.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Aborting Plugin Update (upgrader_post_install filter)’ is closed to new replies.