LLMS_Helper_Keys::deactivate_keys( array $keys )
Deactivate LifterLMS API keys with remote server
Parameters Parameters
- $keys
-
(array) (Required) Array of keys.
Return Return
(array)
Source Source
File: libraries/lifterlms-helper/includes/class-llms-helper-keys.php
public static function deactivate_keys( $keys ) { $keys = array_map( 'sanitize_text_field', $keys ); $keys = array_map( 'trim', $keys ); $data = array( 'keys' => array(), 'url' => get_site_url(), ); $saved = llms_helper_options()->get_license_keys(); foreach ( $keys as $key ) { if ( isset( $saved[ $key ] ) && $saved[ $key ]['update_key'] ) { $data['keys'][ $key ] = $saved[ $key ]['update_key']; } } $req = new LLMS_Dot_Com_API( '/license/deactivate', $data ); return $req->get_result(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.4.1 | Ensure key exists before attempting to deactivate it. |
3.0.0 | Introduced. |