Trying to add "delete products"

I'm trying to add "delete" button to this addon. It says "post deleted" but infact it stays in the database.

if (isset($_POST['delete'])) {
foreach ($_POST['products'] as $product_id) {
$product = new ctrl_product($_GET['product_id']);
    $product->delete();
    notices::add('success', language::translate('success_post_deleted', 'Post deleted'));
    header('Location: '. $_SERVER['REQUEST_URI']);
    exit;
  }
  }

If I change 
$product = new ctrl_product($_GET['product_id']);
 to
$product = new ctrl_product($product_id);

I get a notice : 

Fatal error: Could not find product (ID: 1) in database. in ~/vqmod/vqcache/vq2-includes_controllers_ctrl_product.inc.php on line 65

But the product ID I'm trying to delete is not 1. What I'm I missing here?
I think you have a typo there.

$product = new ctrl_product($_GET['product_id']);

Should be

$product = new ctrl_product($product_id);

Because the previous line says foreach ($_POST['products'] as $product_id) {