/** * Handles resetting the coupon usage counts when the reset_count bulk action is selected. * * @param string $action The name of the action to be performed. */ public function process_bulk_action($action) { if ($action == 'reset_count') { $feeds = rgpost('feed_ids'); if (is_array($feeds)) { foreach ($feeds as $feed_id) { $feed = $this->get_feed($feed_id); if (isset($feed['meta']['usageCount'])) { $feed['meta']['usageCount'] = 0; $this->update_feed_meta($feed_id, $feed['meta']); } } } } else { parent::process_bulk_action($action); } }