# give/4.16.9/src/DonationForms/Controllers/DonationConfirmationReceiptViewController.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 41 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/DonationForms/Controllers/DonationConfirmationReceiptViewController.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/DonationForms/Controllers/DonationConfirmationReceiptViewController.php
- Modified: 2025-03-31T19:17:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/DonationForms/Controllers/DonationConfirmationReceiptViewController.php#L10-L20`.

```php
<?php

namespace Give\DonationForms\Controllers;

use Give\DonationForms\DataTransferObjects\DonationConfirmationReceiptViewRouteData;
use Give\DonationForms\ViewModels\DonationConfirmationReceiptViewModel;
use Give\Donations\Models\Donation;

class DonationConfirmationReceiptViewController
{
    /**
     * This renders the donation confirmation receipt view.
     *
     * @since 3.0.0
     */
    public function show(DonationConfirmationReceiptViewRouteData $data): string
    {
        if (!$data->receiptId) {
            return '';
        }

        $donation = give()->donations->getByReceiptId($data->receiptId);

        if (!$donation) {
            return '';
        }

        /**
         * Fires before the donation confirmation receipt view is rendered.
         *
         * @since 3.4.0
         *
         * @param Donation $donation
         */
        do_action('givewp_donation_confirmation_receipt_showing', $donation);

        ob_clean();
        return (new DonationConfirmationReceiptViewModel($donation))->render();
    }
}

```
