| 1 |
<?php |
| 2 |
/** |
| 3 |
* Displays the donation summary. |
| 4 |
* |
| 5 |
* Override this template by copying it to yourtheme/charitable/donation-receipt/summary.php |
| 6 |
* |
| 7 |
* @author WP Charitable LLC |
| 8 |
* @package Charitable/Templates/Donation Receipt |
| 9 |
* @since 1.0.0 |
| 10 |
* @version 1.4.7 |
| 11 |
*/ |
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
/* @var Charitable_Donation */ |
| 19 |
$donation = $view_args['donation']; |
| 20 |
$amount = $donation->get_total(); |
| 21 |
|
| 22 |
?> |
| 23 |
<dl class="donation-summary"> |
| 24 |
<dt class="donation-id"><?php _e( 'Donation Number:', 'charitable' ); ?></dt> |
| 25 |
<dd class="donation-summary-value"><?php echo $donation->get_number(); ?></dd> |
| 26 |
<dt class="donation-date"><?php _e( 'Date:', 'charitable' ); ?></dt> |
| 27 |
<dd class="donation-summary-value"><?php echo $donation->get_date(); ?></dd> |
| 28 |
<dt class="donation-total"> <?php _e( 'Total:', 'charitable' ); ?></dt> |
| 29 |
<dd class="donation-summary-value"> |
| 30 |
<?php |
| 31 |
/** |
| 32 |
* Filter the total donation amount. |
| 33 |
* |
| 34 |
* @since 1.5.0 |
| 35 |
* |
| 36 |
* @param string $amount The default amount to display. |
| 37 |
* @param float $total The total, unformatted. |
| 38 |
* @param Charitable_Donation $donation The Donation object. |
| 39 |
* @param string $context The context in which this is being shown. |
| 40 |
* @return string |
| 41 |
*/ |
| 42 |
echo apply_filters( 'charitable_donation_receipt_donation_amount', charitable_format_money( $amount ), $amount, $donation, 'summary' ) |
| 43 |
?> |
| 44 |
</dd> |
| 45 |
<dt class="donation-method"><?php _e( 'Payment Method:', 'charitable' ); ?></dt> |
| 46 |
<dd class="donation-summary-value"><?php echo $donation->get_gateway_label(); ?></dd> |
| 47 |
</dl> |
| 48 |
|