PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.7.0.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.7.0.2
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.7.0.2, at templates/donation-receipt/details.php

99 lines 2.8 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 */
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 <h3 class="charitable-header"><?php _ex( 'Your Donation', 'donation receipt header', 'charitable' ); ?></h3>
24 <table class="donation-details charitable-table">
25 <thead>
26 <tr>
27 <th><?php _e( 'Campaign', 'charitable' ); ?></th>
28 <th><?php _e( 'Total', 'charitable' ); ?></th>
29 </tr>
30 </thead>
31 <tbody>
32 <?php foreach ( $donation->get_campaign_donations() as $campaign_donation ) : ?>
33 <tr>
34 <td class="campaign-name">
35 <?php
36 echo $campaign_donation->campaign_name;
37
38 /**
39 * Do something after displaying the campaign name.
40 *
41 * @since 1.3.0
42 *
43 * @param object $campaign_donation Database record for the campaign donation.
44 * @param Charitable_Donation $donation The Donation object.
45 */
46 do_action( 'charitable_donation_receipt_after_campaign_name', $campaign_donation, $donation );
47 ?>
48 </td>
49 <td class="donation-amount"><?php echo charitable_format_money( $campaign_donation->amount, false, false, $donation->get_currency() ); ?></td>
50 </tr>
51 <?php endforeach ?>
52 </tbody>
53 <tfoot>
54 <?php
55 /**
56 * Do something before displaying the total.
57 *
58 * If you add markup, make sure it's a table row with two cells.
59 *
60 * @since 1.5.0
61 *
62 * @param Charitable_Donation $donation The Donation object.
63 */
64 do_action( 'charitable_donation_receipt_before_donation_total', $donation );
65 ?>
66 <tr>
67 <td><?php _e( 'Total', 'charitable' ); ?></td>
68 <td>
69 <?php
70 /**
71 * Filter the total donation amount.
72 *
73 * @since 1.5.0
74 *
75 * @param string $amount The default amount to display.
76 * @param float $total The total, unformatted.
77 * @param Charitable_Donation $donation The Donation object.
78 * @param string $context The context in which this is being shown.
79 * @return string
80 */
81 echo apply_filters( 'charitable_donation_receipt_donation_amount', charitable_format_money( $amount, false, true, $donation->get_currency() ), $amount, $donation, 'details' )
82 ?>
83 </td>
84 </tr>
85 <?php
86 /**
87 * Do something after displaying the total.
88 *
89 * If you add markup, make sure it's a table row with two cells.
90 *
91 * @since 1.5.0
92 *
93 * @param Charitable_Donation $donation The Donation object.
94 */
95 do_action( 'charitable_donation_receipt_after_donation_total', $donation );
96 ?>
97 </tfoot>
98 </table>
99