getDonationId(); $template = Give()->templates->getTemplate(); $receipt = $template->getReceiptDetails($donationId); $donation = new Payment($donationId); $option = static function ($name) { static $options = []; if (empty($options)) { $options = Template::getOptions()['donation_receipt']; } if (isset($options[$name])) { return $options[$name]; } return ''; }; $hasDonationFailed = static function () use ($donation) { return $donation->post_status === 'failed'; }; $donorDashboardUrl = get_permalink(give_get_option('donor_dashboard_page')); $data = $hasDonationFailed() ? [ 'badgeIcon' => '#give-icon-cross', 'badgeText' => esc_html__('Failed', 'give'), 'title' => esc_html__('Donation Failed', 'give'), 'description' => esc_html__('We\'re sorry, your donation failed to process. Please try again or contact site support.', 'give'), ] : [ 'badgeIcon' => '#give-icon-checkmark', 'badgeText' => esc_html__('Success', 'give'), 'title' => $receipt->heading, 'description' => $receipt->message, ]; ob_start(); ?>

getLineItems() || 'PDFReceipt' === $section->id) { continue; } ?>
label) : ?>

label; ?>

value) { continue; } $class = ''; if (DonationReceipt::DONATIONSECTIONID === $section->id) { $class = 'totalAmount' === $lineItem->id ? 'total' : ''; } ?>
icon ?>
label ?>
value ?>
setTitle(esc_html__('Donation Receipt', 'give'))->setPostId($pageId) ->setBody(ob_get_clean()) ->renderBody();