| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays the donation receipt. |
| 4 |
* |
| 5 |
* Override this template by copying it to yourtheme/charitable/content-donation-receipt.php |
| 6 |
* |
| 7 |
* @author WP Charitable LLC |
| 8 |
* @package Charitable/Templates/Donation Receipt |
| 9 |
* @since 1.0.0 |
| 10 |
* @version 1.0.0 |
| 11 |
* @version 1.8.8.6 |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
$charitable_content = $view_args['content']; |
| 20 |
$charitable_donation = $view_args['donation']; |
| 21 |
|
| 22 |
/** |
| 23 |
* Add something before the donation receipt and the page content. |
| 24 |
* |
| 25 |
* @since 1.5.0 |
| 26 |
* |
| 27 |
* @param Charitable_Donation $donation The Donation object. |
| 28 |
*/ |
| 29 |
do_action( 'charitable_donation_receipt_before', $charitable_donation ); |
| 30 |
|
| 31 |
echo $charitable_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 32 |
|
| 33 |
/** |
| 34 |
* Display the donation receipt content. |
| 35 |
* |
| 36 |
* @since 1.5.0 |
| 37 |
* |
| 38 |
* @param Charitable_Donation $donation The Donation object. |
| 39 |
*/ |
| 40 |
do_action( 'charitable_donation_receipt', $charitable_donation ); |
| 41 |
|
| 42 |
/** |
| 43 |
* Add something after the donation receipt. |
| 44 |
* |
| 45 |
* @since 1.5.0 |
| 46 |
* |
| 47 |
* @param Charitable_Donation $donation The Donation object. |
| 48 |
*/ |
| 49 |
do_action( 'charitable_donation_receipt_after', $charitable_donation ); |
| 50 |
|