| 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 |
*/ |
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
$content = $view_args['content']; |
| 19 |
$donation = $view_args['donation']; |
| 20 |
|
| 21 |
/** |
| 22 |
* Add something before the donation receipt and the page content. |
| 23 |
* |
| 24 |
* @since 1.5.0 |
| 25 |
* |
| 26 |
* @param Charitable_Donation $donation The Donation object. |
| 27 |
*/ |
| 28 |
do_action( 'charitable_donation_receipt_before', $donation ); |
| 29 |
|
| 30 |
echo $content; |
| 31 |
|
| 32 |
/** |
| 33 |
* Display the donation receipt content. |
| 34 |
* |
| 35 |
* @since 1.5.0 |
| 36 |
* |
| 37 |
* @param Charitable_Donation $donation The Donation object. |
| 38 |
*/ |
| 39 |
do_action( 'charitable_donation_receipt', $donation ); |
| 40 |
|
| 41 |
/** |
| 42 |
* Add something after the donation receipt. |
| 43 |
* |
| 44 |
* @since 1.5.0 |
| 45 |
* |
| 46 |
* @param Charitable_Donation $donation The Donation object. |
| 47 |
*/ |
| 48 |
do_action( 'charitable_donation_receipt_after', $donation ); |
| 49 |
|