Skip to content

Commit

Permalink
Merge pull request #11 from Freemius/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
vovafeldman authored Nov 13, 2016
2 parents 1373650 + 0fcede4 commit bb6a8b8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

// Include abstract class.
require_once dirname( __FILE__ ) . '/fs-client-migration-abstract.php';
require_once dirname( __FILE__ ) . '/class-fs-client-migration-abstract.php';

/**
* Class My_EDD_Freemius_Migration
Expand Down
17 changes: 15 additions & 2 deletions samples/edd-module-migration.php → client-migration/edd.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
return;
}

require_once dirname( __FILE__ ) . '/fs-client-license-abstract.php';
require_once dirname( __FILE__ ) . '/fs-edd-client-migration.php';
require_once dirname( __FILE__ ) . '/class-fs-client-license-abstract.php';
require_once dirname( __FILE__ ) . '/class-fs-edd-client-migration.php';

/**
* You should use your own unique CLASS name, and be sure to replace it
* throughout this file. For example, if your product's name is "Awesome Product"
* then you can rename it to "Awesome_Product_EDD_License_Key".
*/
class My_EDD_License_Key extends FS_Client_License_Abstract_v1 {
/**
* @author Vova Feldman (@svovaf)
Expand All @@ -25,6 +30,7 @@ class My_EDD_License_Key extends FS_Client_License_Abstract_v1 {
* @return string
*/
function get() {
// You should adjust this to load the license key of your EDD download.
return trim( get_option( 'edd_sample_license_key' ) );
}

Expand All @@ -37,13 +43,20 @@ function get() {
* @return bool True if successfully updated.
*/
function set( $license_key ) {
// You should adjust this to update the license key of your EDD download.
return update_option( 'edd_sample_license_key', $license_key );
}
}

new FS_EDD_Client_Migration_v1(
// This should be replaced with your custom Freemius shortcode.
my_freemius(),

// This should point to your EDD store root URL.
'https://your-edd-store.com',

// The EDD download ID of your product.
'1234',

new My_EDD_License_Key()
);

0 comments on commit bb6a8b8

Please sign in to comment.