/** * Deletes a product option. * * @param int $product_id Product ID. * @param int $id Product option ID. * * @return void */ public function delete_index($product_id = null, $id = null) { $product = $this->get_product($product_id); $option = $this->get_option($id, $product); $deleted = \Service_Product_Option::delete($option); if (!$deleted) { throw new HttpServerErrorException(); } }