Changeset 3182932
- Timestamp:
- 11/06/2024 07:53:54 AM (17 months ago)
- File:
-
- 1 edited
-
unify/trunk/Services/Helper.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
unify/trunk/Services/Helper.php
r3181354 r3182932 161 161 $proLicense = new ProLicense; 162 162 163 // Fetch license from wp_options table164 $proLicenseFromOptionTable = \get_option('codeclouds_unify_pro_license');165 166 163 // Table does not exist, so we will create it 167 164 $proLicense->createTable(); 168 169 !empty($licenseData) && $proLicenseFromOptionTable = $licenseData;170 171 165 // Table exists, fetch data 172 166 $fetchLicenseData = $proLicense->fetchData($option_key); … … 174 168 // Option exists, handle the option value 175 169 $proLicenseFromOptionTable = $fetchLicenseData->option_value; 176 } 177 else { 178 // Option does not exist but row exist 179 if(!empty($fetchLicenseData->id)){ 180 $proLicense->update($fetchLicenseData->id,$option_key,$proLicenseFromOptionTable); 181 } 182 else if(!empty($proLicenseFromOptionTable)){ 183 // Insert unify pro license data into the table 184 $proLicense->saveData($option_key,$proLicenseFromOptionTable); 170 } else{ 171 !empty($licenseData) && $proLicenseFromOptionTable = $licenseData; 172 173 if(empty($proLicenseFromOptionTable)){ 174 // Fetch license from wp_options table 175 $proLicenseFromOptionTable = \get_option('codeclouds_unify_pro_license'); 176 } 177 178 if(!empty($proLicenseFromOptionTable)){ 179 // Option does not exist but row exist 180 if(!empty($fetchLicenseData->id)){ 181 $proLicense->update($fetchLicenseData->id,$option_key,$proLicenseFromOptionTable); 182 } 183 else { 184 // Insert unify pro license data into the table 185 $proLicense->saveData($option_key,$proLicenseFromOptionTable); 186 } 185 187 } 186 188 }
Note: See TracChangeset
for help on using the changeset viewer.