Ready to get started?Download WordPress


How to cleanly cancel Activation of a WordPress Plugin (1 post)

  1. Matthew Denton
    Posted 11 months ago #

    Hi Everyone:

    Have a question that I can answer through trial and error or digging through the WordPress Source Code but thought I would ask here first to save myself some time.

    I have a plugin that ties into 3rd party APIs and as such there are some restrictions on usage. I want to create a function tied to register_activation_hook that will do necessary validation and if it fails error out gracefully so that the plugin does not activate.

    What is the "correct" way of doing this? Should my function generate a PHP Exception, return a WP_Errors object or?



You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by Matthew Denton
  • This topic is not resolved
  • WordPress version: 3.6.1