This commit is contained in:
proelements
2026-05-04 11:47:14 +03:00
parent b499583e5a
commit 872bc6fb57
375 changed files with 39949 additions and 9185 deletions
+11
View File
@@ -76,6 +76,17 @@ class Admin {
}
public function handle_check_license() {
if ( '1' !== Utils::get_super_global_value( $_GET, 'check-license' ) ) {
return;
}
API::get_license_data( true );
wp_safe_redirect( remove_query_arg( 'check-license' ) );
exit;
}
public function register_actions() {
add_filter( 'http_response', [ $this, 'http_remove_pro_templates'], 10, 3 );
+4 -6
View File
@@ -81,10 +81,8 @@ class API {
'value' => json_encode( $value ),
];
$updated = update_option( $cache_key, $data, false );
if ( false === $updated ) {
self::$transient_data[ $cache_key ] = $data;
}
self::$transient_data[ $cache_key ] = $data;
update_option( $cache_key, $data, false );
}
private static function get_transient( $cache_key ) {
@@ -106,7 +104,7 @@ class API {
public static function get_license_data( $force_request = false ) {
$license_data['success'] = true;
$license_data['expires'] = 'lifetime';
$license_data['features'] = [
$license_data['features'] = [
'custom-attributes',
'custom_code',
'custom-css',
@@ -172,7 +170,7 @@ class API {
public static function is_license_active() {
$license_data = self::get_license_data();
return (bool) $license_data['success'];
return (bool) ( $license_data['success'] ?? false );
}
public static function is_license_expired() {