From 6fe1e4bda9c8370d4b2d5faae359bf167e340355 Mon Sep 17 00:00:00 2001 From: selul Date: Wed, 10 Jun 2020 16:14:46 +0300 Subject: [PATCH] release: adds filter Adds key filter --- src/Modules/Licenser.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Modules/Licenser.php b/src/Modules/Licenser.php index 16eca2b5..a5624eed 100644 --- a/src/Modules/Licenser.php +++ b/src/Modules/Licenser.php @@ -667,6 +667,7 @@ private function get_version_data() { if ( isset( $update_data->banners ) ) { $update_data->banners = (array) $update_data->banners; } + return $update_data; } @@ -696,6 +697,7 @@ public function pre_set_site_transient_update_plugins_filter( $_transient_data ) $_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response; } } + return $_transient_data; } @@ -797,6 +799,7 @@ public function load( $product ) { if ( false !== $namespace ) { add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 ); add_filter( 'product_' . $namespace . '_license_status', [ $this, 'get_license_status' ] ); + add_filter( 'product_' . $namespace . '_license_key', [ $this->product, 'get_license' ] ); if ( defined( 'WP_CLI' ) && WP_CLI ) { \WP_CLI::add_command( $namespace . ' activate', [ $this, 'cli_activate' ] ); \WP_CLI::add_command( $namespace . ' deactivate', [ $this, 'cli_deactivate' ] );