WC_Auth::maybe_delete_key()privateWC 2.4.0

Maybe delete key.

Method of the class: WC_Auth{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->maybe_delete_key( $key );
$key(array) (required)
Key.

Changelog

Since 2.4.0 Introduced.

WC_Auth::maybe_delete_key() code WC 8.9.0

private function maybe_delete_key( $key ) {
	global $wpdb;

	if ( isset( $key['key_id'] ) ) {
		$wpdb->delete( $wpdb->prefix . 'woocommerce_api_keys', array( 'key_id' => $key['key_id'] ), array( '%d' ) );
	}
}