← All changes
|
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
+17
-0
3.10.1
→
3.10.5
View file →
| @@ -264,8 +264,25 @@ | ||
| 264 | 264 | return isset( $license_data->license ) ? $license_data : false; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | /** |
| 268 | + * Get license hash. | |
| 269 | + * | |
| 270 | + * @param string $key Product key. | |
| 271 | + * | |
| 272 | + * @return bool|string | |
| 273 | + */ | |
| 274 | + public static function create_license_hash( $key ) { | |
| 275 | + $data = self::get_license_data( $key ); | |
| 276 | + | |
| 277 | + if ( ! $data ) { | |
| 278 | + return false; | |
| 279 | + } | |
| 280 | + | |
| 281 | + return isset( $data->key ) ? wp_hash( $data->key ) : false; | |
| 282 | + } | |
| 283 | + | |
| 284 | + /** | |
| 268 | 285 | * Check if license is valid. |
| 269 | 286 | * |
| 270 | 287 | * @param string $product_file Product basefile. |
| 271 | 288 | * |