/** * Delete a license key. * * ## Options * * <key> * : Key * * @param $args * @param $assoc_args */ public function delete($args, $assoc_args) { list($object) = $args; $object = $this->fetcher->get_check($object); try { $object->delete(); } catch (Exception $e) { WP_CLI::error($e->getMessage()); } WP_CLI::success("Key deleted."); }
/** * Check that the activation ID exists * * @param int * * @return int */ protected function check_object_id($object_id) { $fetcher = new ITELIC_Fetcher('\\ITELIC\\Release'); $activation = $fetcher->get_check($object_id); return $activation->get_pk(); }