• Resolved Austin

    (@austyfrosty)


    Since this plugin relies on Easy Digital Downloads you should do a check on init and deactivate if it’s not available. Otherwise might cause white screen or errors.

    I’m doing this in a few of my own EDD plugins. Try:

    add_action( 'admin_init', array( $this, 'is_edd_activated' ) );
    /**
     * Easy Digital Downloads
     *
     * @return	void
     */
    function is_edd_activated() {
    	if ( !defined( 'EDD_VERSION' ) ) {
    		$this_plugin = plugin_basename( __FILE__ );
    
    		if ( is_plugin_active( $this_plugin ) ) {
    			deactivate_plugins( $this_plugin );
    			add_action( 'admin_notices', array( $this, 'edd_notice' ) );
    		}
    	}
    }
    
    /**
     * Admin notice.
     *
     * @return	string
     */
    function edd_notice() {
    	echo '<div class="updated"><p>' .
    	sprintf( __( '%s requires Easy Digital Downloads! Please activate and/or download EDD first. This plugin has been deactivated.', $this->plugin_name ), $this->plugin_name ) .
    	'</p></div>';
    }

    Putting the functions in there appropriate places.

    https://www.ads-software.com/extend/plugins/appthemer-crowdfunding/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Pippin Williamson

    (@mordauk)

    Definitely a good idea, though I’d update this to simply check if the Easy_Digital_Downloads class exists:

    if( ! class_exists( 'Easy_Digital_Downloads' ) ) {
       // fail gracefully
    }
    Thread Starter Austin

    (@austyfrosty)

    That too.

    msazagreb

    (@msazagreb)

    hi,

    dear,

    Please URGENT HELP, i have problem on my https://www.mariviamsuccessacademy.com web site. I bought domain, name, hosting, emember and ecommerrce and today i tried to add new plug in – appthemer-crowdfunding
    After installation i tried to activate it – from then ( today afternoon) i have only one message on my web – same if i open my site https://www.mariviamsuccessacademy.com but also in WordPress log in site
    this is message:

    Warning: require_once(EDD_PLUGIN_DIRincludes/admin/reporting/class-export.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/88/10318988/html/wp-content/plugins/appthemer-crowdfunding/includes/export.php on line 13

    Fatal error: require_once() [function.require]: Failed opening required ‘EDD_PLUGIN_DIRincludes/admin/reporting/class-export.php’ (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/88/10318988/html/wp-content/plugins/appthemer-crowdfunding/includes/export.php on line 13

    THANKS FOR URGENT HELPPPPPP

    Adam Pickering

    (@adampickering)

    We updated the plugin to fix this issue.

    msazagreb

    (@msazagreb)

    hi to all,

    installed plug in is working but after i add new campaign – set up everything – this is what i get

    Warning: include(/home/content/88/10318988/html/wp-content/plugins/appthemer-crowdfunding//templates/single-campaign.php) [function.include]: failed to open stream: No such file or directory in /home/content/88/10318988/html/wp-includes/template-loader.php on line 47

    Warning: include() [function.include]: Failed opening ‘/home/content/88/10318988/html/wp-content/plugins/appthemer-crowdfunding//templates/single-campaign.php’ for inclusion (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/88/10318988/html/wp-includes/template-loader.php on line 47

    Adam Pickering

    (@adampickering)

    Please install the latest version of the crowd funding plugin version 0.6 which can be downloaded from within your WordPress dashboard or here: https://www.ads-software.com/extend/plugins/appthemer-crowdfunding/

    @ Austin Passy, @ mordauk
    Please, where do i supposed to enter the below or the above codes?

    if( ! class_exists( ‘Easy_Digital_Downloads’ ) ) {
    // fail gracefully
    }

    As long as you have the latest version, there is no need for that.

    ^^
    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘EDD check’ is closed to new replies.