Skip to content

Commit

Permalink
chore: Updated Appsero
Browse files Browse the repository at this point in the history
  • Loading branch information
devAsadNur committed Nov 29, 2024
1 parent e662993 commit 009349c
Show file tree
Hide file tree
Showing 5 changed files with 448 additions and 694 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"minimum-stability": "stable",
"require": {
"php": ">=7.4",
"appsero/client": "dev-develop"
"appsero/client": "^2.0.4"
},
"require-dev": {
"wp-coding-standards/wpcs": "*",
Expand Down
125 changes: 76 additions & 49 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 12 additions & 19 deletions dependencies/Appsero/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Client {
*
* @var string
*/
public $version = '1.2.5';
public $version = '2.0.4';

/**
* Hash identifier of the plugin
Expand Down Expand Up @@ -85,13 +85,6 @@ class Client {
*/
private $insights;

/**
* The Object of Updater Class
*
* @var object
*/
private $updater;

/**
* The Object of License Class
*
Expand Down Expand Up @@ -137,21 +130,21 @@ public function insights() {
/**
* Initialize plugin/theme updater
*
* @return WeDevs\DokanMigrator\Dependencies\Appsero\Updater
* @return void
*/
public function updater() {
if ( ! class_exists( __NAMESPACE__ . '\Updater' ) ) {
require_once __DIR__ . '/Updater.php';
// do not show update notice on ajax request and rest api request
if ( wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) {
return;
}

// if already instantiated, return the cached one
if ( $this->updater ) {
return $this->updater;
}
// show deprecated notice
_deprecated_function( __CLASS__ . '::updater', '2.0', '\WeDevs\DokanMigrator\Dependencies\Appsero\Updater::init($client);, for more details please visit: https://appsero.com/docs/appsero-developers-guide/appsero-client/appsero-sdk-updater-changes/' );

$this->updater = new Updater( $this );

return $this->updater;
// initialize the new updater
if ( method_exists( '\WeDevs\DokanMigrator\Dependencies\Appsero\Updater', 'init' ) ) {
\WeDevs\DokanMigrator\Dependencies\Appsero\Updater::init( $this );
}
}

/**
Expand Down Expand Up @@ -198,7 +191,7 @@ protected function set_basename_and_slug() {

require_once ABSPATH . 'wp-admin/includes/plugin.php';

$plugin_data = get_plugin_data( $this->file );
$plugin_data = get_plugin_data( $this->file, false, false );

$this->project_version = $plugin_data['Version'];
$this->type = 'plugin';
Expand Down
Loading

0 comments on commit 009349c

Please sign in to comment.