Skip to content

Commit c01885f

Browse files
committed
Fixing the class name and small issues
1 parent d9e9d71 commit c01885f

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
phpcs.xml

src/LicenseHandler.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace GravityWP\LicenseHandler;
1313

1414
use GFCommon;
15-
use GravityWP\Updater;
15+
use GravityWP\Updater\Plugin_Updater;
1616

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

@@ -172,7 +172,6 @@ class LicenseHandler {
172172
* @since 1.0
173173
*
174174
* @param string $gwp_addon_class GravityWP GF Addon classname.
175-
* @param string $license_hash Paddlepress license hash for this Addon.
176175
* @param string $plugin_file_path Path to main plugin file.
177176
*
178177
* @return void
@@ -182,15 +181,15 @@ public function __construct( $gwp_addon_class, $plugin_file_path ) {
182181
if ( ! current_user_can( 'manage_options' ) && ! $doing_cron ) {
183182
return;
184183
}
185-
$this->_addon_class = $gwp_addon_class;
186-
$this->_addon_file_path = $plugin_file_path;
187-
$this->_addon_slug = $gwp_addon_class::get_instance()->get_slug();
188-
$this->_addon_license = $gwp_addon_class::get_instance()->get_plugin_setting( $this->_addon_slug . '_license_key' );
184+
$this->_addon_class = $gwp_addon_class;
185+
$this->_addon_file_path = $plugin_file_path;
186+
$this->_addon_slug = $gwp_addon_class::get_instance()->get_slug();
187+
$this->_addon_license = $gwp_addon_class::get_instance()->get_plugin_setting( $this->_addon_slug . '_license_key' );
189188
$this->initialize_paddlepress_client();
190189
}
191190

192191
/**
193-
* Initialize or reinitialize the Paddlepress client .
192+
* Initialize or reinitialize the Paddlepress client.
194193
*
195194
* @return bool
196195
*/
@@ -202,7 +201,7 @@ public function initialize_paddlepress_client( $field_setting = null ) {
202201
$this->_license_handler = new Plugin_Updater(
203202
$this->_addon_file_path,
204203
array(
205-
'version' => $gwp_addon_class::get_instance()->version, // current version number.
204+
'version' => $this->_addon_class::get_instance()->get_version(), // current version number.
206205
'license_key' => $license_key, // license key (used get_option above to retrieve from DB)..'error'
207206
'license_url' => home_url(), // license domain.
208207
'download_tag' => $this->_addon_slug, // download tag slug.

src/changelog.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
= 2.0.3 =
2+
- Fixing the class name and small issues.
13

2-
= 1.1.0 =
4+
= 2.0.0 =
35
- Update license handler to support and work with Paddlepress Pro.
46

57
= 1.0.21 =

0 commit comments

Comments
 (0)