Exemplo n.º 1
0
 /**
  * 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.");
 }
Exemplo n.º 2
0
 /**
  * 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();
 }