Skip to content

Commit

Permalink
Added check for Social_Warfare_Addon. warfare-plugins/social-warfare#594
Browse files Browse the repository at this point in the history
  • Loading branch information
ckmahoney committed Aug 20, 2018
1 parent 69087db commit c26173e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Social_Warfare_AffiliateWP.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<?php
if ( class_exists( 'SWP_ADDON' ) ) :
if ( !class_exists( 'Social_Warfare_Addon' ) ) :
if ( !defined( 'SWP_PLUGIN_DIR' ) ) :
$message = 'Please install and activate Social Warfare before activating Social Warfare - AffiliateWP.';
trigger_error( $message, E_WARNING );
endif;

class Social_Warfare_AffiliateWP extends SWP_Addon {
require_once( SWP_PLUGIN_DIR . '/lib/Social_Warfare_Addon.php' );
endif;

class Social_Warfare_AffiliateWP extends Social_Warfare_Addon {
public function __construct() {
parent::__construct();
$this->name = 'Social Warfare - AffiliateWP';
Expand Down

0 comments on commit c26173e

Please sign in to comment.