PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / templates / donation-receipt / details.php

details.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at templates/donation-receipt/details.php

100 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Displays the donation details.
4 *
5 * Override this template by copying it to yourtheme/charitable/donation-receipt/details.php
6 *
7 * @author WP Charitable LLC
8 * @package Charitable/Templates/Donation Receipt
9 * @since 1.0.0
10 * @version 1.6.55
11 * @version 1.8.8.6
12 */
13
14 // Exit if accessed directly.
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 /* @var Charitable_Donation */
20 $charitable_donation = $view_args['donation'];
21 $charitable_amount = $charitable_donation->get_total();
22
23 ?>
24 <h3 class="charitable-header"><?php echo esc_html_x( 'Your Donation', 'donation receipt header', 'charitable' ); ?></h3>
25 <table class="donation-details charitable-table">
26 <thead>
27 <tr>
28 <th><?php esc_html_e( 'Campaign', 'charitable' ); ?></th>
29 <th><?php esc_html_e( 'Total', 'charitable' ); ?></th>
30 </tr>
31 </thead>
32 <tbody>
33 <?php foreach ( $charitable_donation->get_campaign_donations() as $charitable_campaign_donation ) : ?>
34 <tr>
35 <td class="campaign-name">
36 <?php
37 echo esc_html( $charitable_campaign_donation->campaign_name );
38
39 /**
40 * Do something after displaying the campaign name.
41 *
42 * @since 1.3.0
43 *
44 * @param object $campaign_donation Database record for the campaign donation.
45 * @param Charitable_Donation $donation The Donation object.
46 */
47 do_action( 'charitable_donation_receipt_after_campaign_name', $charitable_campaign_donation, $charitable_donation );
48 ?>
49 </td>
50 <td class="donation-amount"><?php echo charitable_format_money( $charitable_campaign_donation->amount, false, false, $charitable_donation->get_currency() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
51 </tr>
52 <?php endforeach ?>
53 </tbody>
54 <tfoot>
55 <?php
56 /**
57 * Do something before displaying the total.
58 *
59 * If you add markup, make sure it's a table row with two cells.
60 *
61 * @since 1.5.0
62 *
63 * @param Charitable_Donation $donation The Donation object.
64 */
65 do_action( 'charitable_donation_receipt_before_donation_total', $charitable_donation );
66 ?>
67 <tr>
68 <td><?php esc_html_e( 'Total', 'charitable' ); ?></td>
69 <td>
70 <?php
71 /**
72 * Filter the total donation amount.
73 *
74 * @since 1.5.0
75 *
76 * @param string $amount The default amount to display.
77 * @param float $total The total, unformatted.
78 * @param Charitable_Donation $donation The Donation object.
79 * @param string $context The context in which this is being shown.
80 * @return string
81 */
82 echo apply_filters( 'charitable_donation_receipt_donation_amount', charitable_format_money( $charitable_amount, false, true, $charitable_donation->get_currency() ), $charitable_amount, $charitable_donation, 'details' ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
83 ?>
84 </td>
85 </tr>
86 <?php
87 /**
88 * Do something after displaying the total.
89 *
90 * If you add markup, make sure it's a table row with two cells.
91 *
92 * @since 1.5.0
93 *
94 * @param Charitable_Donation $donation The Donation object.
95 */
96 do_action( 'charitable_donation_receipt_after_donation_total', $charitable_donation );
97 ?>
98 </tfoot>
99 </table>
100