• Resolved Richard

    (@richardashby)


    Hi,

    First off- awesome plugin, thank you!

    I found an issue with Easy Digital Downloads (EDD) software licensing (premium) add on:
    https://easydigitaldownloads.com/downloads/software-licensing/

    I hope this explanation makes sense…

    Scenario:
    WP install 1 is my EDD store, running: EDD, EDD software licenses, WP SpamShield
    My test downloadable product allows buyers of this plugin to get automatic updates from the WP dashboard

    WP install 2- on this site I have bought and installed the test downloadable product from WP install 1. I am NOT running WP-SpamShield on this site. When I go to activate the license key on the test downloadable product’s settings page an API request is sent to WP install 1 but something goes wrong in that process.

    The issue is that the license keys are not activating or deactivating correctly. I believe this to be a plugin conflict because of this article, and disabling WP Spam Shield gets it working straight away.

    Code:

    // data to send in our API request
    		$api_params = array(
    			'edd_action'=> 'deactivate_license',
    			'license' 	=> $license,
    			'item_name' => urlencode( CLIPRO_DEMO_PRODUCT ), // the name of our product in EDD
    			'url'       => home_url()
    		);
    
    		// Call the custom API.
    		$response = wp_remote_post( CLIPRO_LOCALHOST, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
    
    		// make sure the response came back okay
    		if ( is_wp_error( $response ) )
    			return false;
    
    		// decode the license data
    		$license_data = json_decode( wp_remote_retrieve_body( $response ) );
    
    		// @todo Sanitise $license_data response data and warn if error
    
    		// $license_data->license will be either "deactivated" or "failed"
    		if( $license_data->license == 'deactivated' )
    			delete_option( 'edd_sample_license_status' );

    (I’ve marked where additional sanitisation will at least stop the error bubbling to the user)

    Error message:

    Notice: Trying to get property of non-object in /mysite/wp-content/plugins/test-product-dummy-plugin-1.0.0/updater.php on line 187
    
    Warning: Cannot modify header information - headers already sent by (output started at /mysite/wp-content/plugins/test-product-dummy-plugin-1.0.0/updater.php:187) in /mysite/wp-includes/pluggable.php on line 1196

    I am assuming that the $license_data is coming back with a warning / not getting through at all.

    Happy to provide any additional info you need to help you resolve this one. I appreciate this is a premium plugin and you’re obviously not expected to buy it just to support it. Perhaps you have an inkling as to the source of the issue and I can test stuff out on my side. Presumably wp_remote_retrieve_body()? I’m a plugin developer so can work my way round the codebase if you point me in the right direction.

    Thanks!
    Richard

    https://wordpress.org/plugins/wp-spamshield/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor redsand

    (@redsand)

    Hi Richard,

    Thanks!

    I’m sorry to hear about the plugin conflict. We’ll be happy to look into that. It should be a fairly easy fix.

    I’ll need a bit more info from you on the specifics and we’ll need to email back and forth, so please head over to the WP-SpamShield Support Form, and take a moment to fill out a support request. Refer to this thread, as I’ll be the one responding to you, so I’ll be familiar with the situation when it comes in. We’ll need to run a couple tests that shouldn’t take long.

    We’ve also recently added some hooks to the plugin that other plugin developers can use to provide compatibility for issues like this. Not many know about it yet (just ones we’ve been in touch with directly) since we’re still working on the documentation for it, but that should be done soon.

    – Scott

    Thread Starter Richard

    (@richardashby)

    Thanks for the quick response Scott! Message sent.

    I forgot to include the URL to a test product- I can send you that via email once we’re in contact.

    Cheers 🙂

    Plugin Contributor redsand

    (@redsand)

    You’re very welcome! 🙂 Just wrote you back. Not a problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with EDD software licensing add on’ is closed to new replies.