Skip to content

Commit

Permalink
Fixing the class name and small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-works committed Jun 27, 2024
1 parent d9e9d71 commit c01885f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
phpcs.xml
15 changes: 7 additions & 8 deletions src/LicenseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace GravityWP\LicenseHandler;

use GFCommon;
use GravityWP\Updater;
use GravityWP\Updater\Plugin_Updater;

defined( 'ABSPATH' ) || die();

Expand Down Expand Up @@ -172,7 +172,6 @@ class LicenseHandler {
* @since 1.0
*
* @param string $gwp_addon_class GravityWP GF Addon classname.
* @param string $license_hash Paddlepress license hash for this Addon.
* @param string $plugin_file_path Path to main plugin file.
*
* @return void
Expand All @@ -182,15 +181,15 @@ public function __construct( $gwp_addon_class, $plugin_file_path ) {
if ( ! current_user_can( 'manage_options' ) && ! $doing_cron ) {
return;
}
$this->_addon_class = $gwp_addon_class;
$this->_addon_file_path = $plugin_file_path;
$this->_addon_slug = $gwp_addon_class::get_instance()->get_slug();
$this->_addon_license = $gwp_addon_class::get_instance()->get_plugin_setting( $this->_addon_slug . '_license_key' );
$this->_addon_class = $gwp_addon_class;
$this->_addon_file_path = $plugin_file_path;
$this->_addon_slug = $gwp_addon_class::get_instance()->get_slug();
$this->_addon_license = $gwp_addon_class::get_instance()->get_plugin_setting( $this->_addon_slug . '_license_key' );
$this->initialize_paddlepress_client();
}

/**
* Initialize or reinitialize the Paddlepress client .
* Initialize or reinitialize the Paddlepress client.
*
* @return bool
*/
Expand All @@ -202,7 +201,7 @@ public function initialize_paddlepress_client( $field_setting = null ) {
$this->_license_handler = new Plugin_Updater(
$this->_addon_file_path,
array(
'version' => $gwp_addon_class::get_instance()->version, // current version number.
'version' => $this->_addon_class::get_instance()->get_version(), // current version number.
'license_key' => $license_key, // license key (used get_option above to retrieve from DB)..'error'
'license_url' => home_url(), // license domain.
'download_tag' => $this->_addon_slug, // download tag slug.
Expand Down
4 changes: 3 additions & 1 deletion src/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
= 2.0.3 =
- Fixing the class name and small issues.

= 1.1.0 =
= 2.0.0 =
- Update license handler to support and work with Paddlepress Pro.

= 1.0.21 =
Expand Down

0 comments on commit c01885f

Please sign in to comment.