Conflict with EDD software licensing add on
-
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 dashboardWP 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
- The topic ‘Conflict with EDD software licensing add on’ is closed to new replies.