How to check for already existing plugin versions on activation? and prevent errors

If a user has a version of my plugin installed and activated, let's say version 1.1And I send the user version 1.2

If a user has a version of my plugin installed and activated, let's say version 1.1 And I send the user version 1.2 and he tries to upload and activate the new version, what will happen is that they will get an error: "Failed to redeclare activate_function()"

I'm struggling to see how I can prevent this. If I use class_exists or function_exists to check, that's still not working, the newer version will run first, and then the older version will error out.

I just want to do it nice and smoothly without errors. Thoughts?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742419957a4440484.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信