From 7dc3eda7e8f96b1207033c4d65b61d1c8a2883e3 Mon Sep 17 00:00:00 2001
From: Andrei
Date: Tue, 18 Jun 2019 19:56:16 +0200
Subject: [PATCH] Updated - URLs for License details & plugin update
---
src/Api.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/Api.php b/src/Api.php
index 102720f..c9822c3 100644
--- a/src/Api.php
+++ b/src/Api.php
@@ -11,7 +11,6 @@ class Api {
private $type;
public function __construct($path, $slug) {
-
$this->path = $path;
$this->slug = $slug;
$this->type = strpos($path, '/plugins/') !== false ? 'plugin' : 'theme';
@@ -19,7 +18,7 @@ public function __construct($path, $slug) {
// Auto-update
$detailsUrl = add_query_arg([
'licenseKey' => $this->getLicenseKey()
- ], $this->getMarketUrl('details.json'));
+ ], $this->getMarketUrl('update'));
$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker($detailsUrl, $path, $slug);
add_action('admin_footer', [$this, 'adminFooter']);
@@ -37,12 +36,12 @@ public function getLicense() {
$licenseKey = $this->getLicenseKey();
if (!$licenseKey) {
- return new WP_Error('license_key_not_found', __('License Key not found'));
+ return new WP_Error('license_key_not_found', 'License Key not found');
}
$url = add_query_arg([
'site' => urlencode(site_url())
- ], 'https://layered.market/license/verify/' . $this->slug . '/' . $licenseKey);
+ ], 'https://layered.market/licenses/' . $licenseKey . '/verify/' . $this->slug);
if (isset($_REQUEST[$this->slug . '-recheck-license']) || false === ($licenseData = get_transient($this->slug . '-license-data'))) {
@@ -100,7 +99,7 @@ public function licenseDetails() {
↻
Auto renew:
- Manage on Layered Market
+ Manage License on Layered Market