/** * Process the bulk actions * @access public * @since 1.0 * @return void */ public function process_bulk_action() { $ids = isset($_GET['receipt']) ? $_GET['receipt'] : false; if (!is_array($ids)) { $ids = array($ids); } foreach ($ids as $id) { if ('delete' === $this->current_action()) { edd_ppe_remove_receipt($id); } } }
/** * Listens for when a receipt delete button is clicked and deletes the receipt * * @since 1.0 * @param array $data Receipt data * @uses edd_ppe_remove_receipt() * @return void */ function edd_ppe_delete_receipt($data) { if (!isset($data['_wpnonce']) || !wp_verify_nonce($data['_wpnonce'], 'edd_receipt_nonce')) { wp_die(__('Trying to cheat or something?', 'edd-ppe'), __('Error', 'edd-ppe')); } $receipt_id = $data['receipt']; edd_ppe_remove_receipt($receipt_id); }