PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / includes / emails / actions.php

actions.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at includes/emails/actions.php

37 lines 774 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Email Actions.
4 *
5 * @package Give
6 * @subpackage Emails
7 * @copyright Copyright (c) 2016, GiveWP
8 * @license https://opensource.org/licenses/gpl-license GNU Public License
9 * @since 1.0
10 */
11
12 // Exit if accessed directly.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Triggers a donation receipt to be sent after the payment status is updated.
19 *
20 * @since 1.0
21 *
22 * @param int $payment_id Payment ID
23 *
24 * @return void
25 */
26 function give_trigger_donation_receipt( $payment_id ) {
27 // Make sure we don't send a receipt while editing a donation.
28 if ( ! is_numeric( $payment_id ) ) {
29 return;
30 }
31
32 // Send email.
33 give_email_donation_receipt( $payment_id );
34 }
35
36 add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 );
37