• Unlimited downloads from €14.50/month
  • 19+ million premium assets and templates
  • Cancellable at any time
  • Templates, Mockups, Media, Fonts, +5

WooCommerce Software License Manager

by Omid Shamlu

10 Ratings

  • 4.0

Active Installations

80+

Last Update

3 years

Quality

D

Plugin Description

Description
Seamless integration between WooCommerce and the Software License Manager Plugin. Originally adopted from EDD Software License Manager, thanks to flowdee (coder@flowdee.de).
Github repository
https://github.com/shamloo/wc-software-license-manager
Features
Automatically creates license keys for each sale with WC
Licensing is optional and can be activated/deactivated individually
Send generated license keys to your customers within your existing email notifications
Sample code
‘;
echo ‘

Sample License Management

‘;

/*** License activate button was clicked ***/
if (isset($_REQUEST[‘activate_license’])) {
$license_key = $_REQUEST[‘sample_license_key’];
// Send query to the license manager server
$lic = new youlice_class($license_key , YOUR_LICENSE_SERVER_URL , YOUR_SPECIAL_SECRET_KEY );
if($lic->active()){
echo ‘You license Activated successfuly’;
}else{
echo $lic->err;
}

}

$lic = new youlice_class($license_key , YOUR_LICENSE_SERVER_URL , YOUR_SPECIAL_SECRET_KEY );
if($lic->is_licensed()){
echo ‘Thank You Phurchasing!’;
}else{
?>

‘;
}

class youlice_class{
public $lic;
public $server;
public $api_key;
private $wp_option = ‘product_1450’;
private $product_id = ‘My_product_name_OR_ID’;
public $err;
public function __construct($lic=false , $server , $api_key){
if($this->is_licensed())
$this->lic = get_option($this->wp_option);
else
$this->lic = $lic;

$this->server = $server;
$this->api_key = $api_key;
}
/**
* check for current product if licensed
* @return boolean
*/
public function is_licensed(){
$lic = get_option($this->wp_option);
if(!empty( $lic ))
return true;
return false;
}

/**
* send query to server and try to active lisence
* @return boolean
*/
public function active(){
$url = YOUR_LICENSE_SERVER_URL . ‘/?secret_key=’ . YOUR_SPECIAL_SECRET_KEY . ‘&slm_action=slm_activate&license_key=’ . $this->lic . ‘&registered_domain=’ . get_bloginfo(‘siteurl’).’&item_reference=’.$this->product_id;
$response = wp_remote_get($url, array(‘timeout’ => 20, ‘sslverify’ => false));

if(is_array($response)){
$json = $response[‘body’]; // use the content
$json = preg_replace(‘/[x00-x1Fx80-xFF]/’, ”, utf8_encode($json));
$license_data = json_decode($json);
}
if($license_data->result == ‘success’){
update_option( $this->wp_option, $this->lic );
return true;
}else{
$this->err = $license_data->message;
return false;
}
}

/**
* send query to server and try to deactive lisence
* @return boolean
*/
public function deactive(){

}

}
Theme & Plugin Integration
Please Note: The license validation part for your distributed plugins and themes is not part of this plugin. More on this can be found in the Software License Manager documentation.
To implement License Key validation in your plugin or theme, please check out the sample code in Maddison Designs’ Github repo.
Attention
Known incompatibility issue with iThemes Security
If you have installed “iThemes Security”, uncheck Long URL Strings where the Software License Manager plugin is installed
Credits
Woocommerce
Software License Manager
EDD Software License Manager
WP 4.8.2 and WC 3.2.0 Compatibility
Translates
Persian
Spanish (Spain) Art Project Group
Configuration
The plugin is really simple and well structured so you don’t have to prepare a lot in order to get it working.
After the successful installation you will find a prepared options page here: “WooCommerce” > “Settings” > “Products” > “License Manager”
Enter your Software License Manager API credentials
Go to your Products and activate licensing where it’s required

Similar Plugins

  • Report Bug
The content on this website originates from various sources. All rights to the original content remain with the respective author. If you believe that your copyrights have been infringed by the use of content on this website, please contact us at info@plugin-guru.com. We will remove the content in question immediately.

This is the heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Regular Price

Free download

Key Features

  • You will be redirected to the retailer

Collections

Create your first Collection

To create a collection, simply click on the symbol on the desired plugin.

You can see this symbol when you move the mouse over the plugin. 

Current Level

Plugin Magican

You have reached 0 views on your collections and are currently Plugin Magican. You magically help people find the right plugins and are a great asset to the community

0 of 500 views reached