function is_valid_license( $license ) {
		try {
			$response = GeotargetingWP::checkLicense( $license );
			$result   = json_decode( $response );
			// update license
			if ( isset( $result->success ) ) {
				update_option( 'geot_license_active', 'valid' );
			} else {
				delete_option( 'geot_license_active' );
			}
		} catch ( \Exception $e ) {
			return \GuzzleHttp\json_encode( [ 'error' => $e->getMessage() ] );
		}

		return $response;
	}
function is_valid_license( $license ) {
		try {
			$response = GeotargetingWP::checkLicense( $license );
			$result   = json_decode( $response );
			// update license
			if ( isset( $result->success ) ) {
				update_option( 'geot_license_active', 'valid' );
			} else {
				delete_option( 'geot_license_active' );
			}
		} catch ( \Exception $e ) {
			return \GuzzleHttp\json_encode( [ 'error' => $e->getMessage() ] );
		}

		return $response;
	}
function is_valid_license ( $ license ) { try { $ response = GeotargetingWP :: checkLicense ( $ license ) ; $ result = json_decode ( $ response ) ; // update license if ( isset ( $ result -> success ) ) { update_option ( 'geot_license_active' , 'valid' ) ; } else { delete_option ( 'geot_license_active' ) ; } } catch ( \ Exception $ e ) { return \ GuzzleHttp \ json_encode ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ response ; }
Call the API and update if valid license
Return original response for later use

@param $license

@return mixed
Call the API and update if valid license Return original response for later use