Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
give
/
src
/
DonationForms
/
Actions
:
ReplaceGiveReceiptShortcodeViewWithDonationConfirmationIframe.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Give\DonationForms\Actions; use Give\DonationForms\DataTransferObjects\DonationConfirmationReceiptViewRouteData; class ReplaceGiveReceiptShortcodeViewWithDonationConfirmationIframe { /** * Replace the give_receipt shortcode with the v3 confirmation page iframe. * * @since 3.16.0 */ public function __invoke(string $view): string { $data = DonationConfirmationReceiptViewRouteData::fromRequest(give_clean($_GET)); if ($data->receiptId) { $viewUrl = (new GenerateDonationConfirmationReceiptViewRouteUrl())($data->receiptId); return "<iframe style='width: 1px;min-width: 100%;border: 0;' data-givewp-embed src='$viewUrl'></iframe>"; } return $view; } }