| 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 |
* @version 1.8.8.6 |
| 12 |
* @version 1.8.10.5 |
| 13 |
*/ |
| 14 |
|
| 15 |
// Exit if accessed directly. |
| 16 |
if ( ! defined( 'ABSPATH' ) ) { |
| 17 |
exit; |
| 18 |
} |
| 19 |
|
| 20 |
/* @var Charitable_Donation */ |
| 21 |
$charitable_donation = $view_args['donation']; |
| 22 |
$charitable_amount = $charitable_donation->get_total(); |
| 23 |
|
| 24 |
?> |
| 25 |
<dl class="donation-summary"> |
| 26 |
<dt class="donation-id"><?php esc_html_e( 'Donation Number:', 'charitable' ); ?></dt> |
| 27 |
<dd class="donation-summary-value"><?php echo esc_html( $charitable_donation->get_number() ); ?></dd> |
| 28 |
<dt class="donation-date"><?php esc_html_e( 'Date:', 'charitable' ); ?></dt> |
| 29 |
<dd class="donation-summary-value"><?php echo esc_html( $charitable_donation->get_date() ); ?></dd> |
| 30 |
<dt class="donation-total"> <?php esc_html_e( 'Total:', 'charitable' ); ?></dt> |
| 31 |
<dd class="donation-summary-value"> |
| 32 |
<?php |
| 33 |
/** |
| 34 |
* Filter the total donation amount. |
| 35 |
* |
| 36 |
* @since 1.5.0 |
| 37 |
* |
| 38 |
* @param string $amount The default amount to display. |
| 39 |
* @param float $total The total, unformatted. |
| 40 |
* @param Charitable_Donation $donation The Donation object. |
| 41 |
* @param string $context The context in which this is being shown. |
| 42 |
* @return string |
| 43 |
*/ |
| 44 |
echo apply_filters( 'charitable_donation_receipt_donation_amount', charitable_format_money( $charitable_amount, false, true, $charitable_donation->get_currency() ), $charitable_amount, $charitable_donation, 'summary' ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 45 |
?> |
| 46 |
</dd> |
| 47 |
<dt class="donation-method"><?php esc_html_e( 'Payment Method:', 'charitable' ); ?></dt> |
| 48 |
<dd class="donation-summary-value"><?php echo esc_html( $charitable_donation->get_gateway_label() ); ?></dd> |
| 49 |
</dl> |
| 50 |
|