← All changes
|
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
+7
-3
4.2.11
→
trunk
View file →
| @@ -903,17 +903,21 @@ | ||
| 903 | 903 | $this->do_check = true; |
| 904 | 904 | |
| 905 | 905 | return $_transient_data; |
| 906 | 906 | } |
| 907 | + $this->product->setup_from_fileheaders(); | |
| 907 | 908 | $api_response = $this->api_request(); |
| 908 | 909 | if ( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) { |
| 910 | + $plugin = $this->product->get_slug() . '/' . $this->product->get_file(); | |
| 909 | 911 | if ( ! isset( $api_response->plugin ) ) { |
| 910 | - $api_response->plugin = $this->product->get_slug() . '/' . $this->product->get_file(); | |
| 912 | + $api_response->plugin = $plugin; | |
| 911 | 913 | } |
| 912 | 914 | if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) { |
| 913 | - $_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response; | |
| 915 | + $_transient_data->response[ $plugin ] = $api_response; | |
| 916 | + unset( $_transient_data->no_update[ $plugin ] ); | |
| 914 | 917 | } else { |
| 915 | - $_transient_data->no_update[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response; | |
| 918 | + $_transient_data->no_update[ $plugin ] = $api_response; | |
| 919 | + unset( $_transient_data->response[ $plugin ] ); | |
| 916 | 920 | } |
| 917 | 921 | } |
| 918 | 922 | |
| 919 | 923 | return $_transient_data; |