diff --git a/Includes/API/Manager.php b/Includes/API/Manager.php index 04f1183..aff90b7 100644 --- a/Includes/API/Manager.php +++ b/Includes/API/Manager.php @@ -899,6 +899,7 @@ private function get_validation_args( string $flag ): array { return array( 'form_state' => 'validate', 'flag' => $flag, + 'slug' => $this->product_slug, ); } @@ -1176,7 +1177,7 @@ public function validate_license( array $parameters ) { $headers = array( // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - 'Authorization' => 'TWS ' . base64_encode( "{$license->key}/{$license->purchased_on}:{$this->hash}" ), + 'Authorization' => 'TWS ' . base64_encode( "{$this->key}/{$license->purchased_on}:{$this->hash}" ), 'Referer' => get_bloginfo( 'url' ), ); @@ -1220,7 +1221,9 @@ private function prepare_request() { return; } - if ( $this->key === $this->get_license( 'key' ) ) { + $meta_key = $this->parse_url( get_bloginfo( 'url' ) ) . '-' . $this->product_slug; + + if ( $meta_key === $this->get_license( 'key' ) ) { // No further processing if license is already active for this site. if ( 'deactivate' !== $this->step && 'active' === $this->get_license( 'status' ) ) { $this->client->add_error(