Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3.1406 |
Changes | 0 |
1 | <?php |
||
26 | function give_trigger_donation_receipt( $payment_id ) { |
||
27 | // Make sure we don't send a receipt while editing a donation. |
||
28 | 42 | if ( isset( $_POST['give-action'] ) && 'edit_payment' == $_POST['give-action'] ) { |
|
29 | return; |
||
30 | } |
||
31 | |||
32 | // Send email. |
||
33 | 42 | give_email_donation_receipt( $payment_id ); |
|
34 | 42 | } |
|
35 | |||
36 | add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 ); |