Rearrange the defines in the index page so it will load classes before
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 25 Apr 2016 18:45:38 +0000 (14:45 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 25 Apr 2016 18:45:38 +0000 (14:45 -0400)
it tries to setup activate function

index.php

index 81ef4d4..dad2351 100644 (file)
--- a/index.php
+++ b/index.php
@@ -21,10 +21,6 @@ define('GLM_COUPON_TAX_CATEGORIES', 'glm_couponscategory');
 define('GLM_COUPON_BUILTIN_CAPABILITIES', 'edit_posts');
 define('GLM_COUPON_TERM_CAPABILITIES', 'manage_glmcouponterms');
 
-/* Register Activation or Deactivation hooks
- */
-register_activation_hook(__FILE__, array('glm_coupon_admin', 'activate_plugin'));
-
 /**
  * Required class files
  */
@@ -32,6 +28,10 @@ require_once 'controllers/admin.php';
 require_once 'controllers/front.php';
 require_once 'models/coupon.php';
 require_once 'models/database.php';
+/* Register Activation or Deactivation hooks
+ */
+register_activation_hook(__FILE__, array('glm_coupon_admin', 'activate_plugin'));
+
 /**
  * The Database Setup
  */