| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | * Email Actions. |
| 4 | 4 | * |
| 5 | 5 | * @package Give |
| 6 | 6 | * @subpackage Emails |
| 7 | - * @copyright Copyright (c) 2016, WordImpress | |
| 7 | + * @copyright Copyright (c) 2016, GiveWP | |
| 8 | 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | 9 | * @since 1.0 |
| 10 | 10 | */ |
| 11 | 11 | |
| @@ -24,9 +24,9 @@ | ||
| 24 | 24 | * @return void |
| 25 | 25 | */ |
| 26 | 26 | function give_trigger_donation_receipt( $payment_id ) { |
| 27 | 27 | // Make sure we don't send a receipt while editing a donation. |
| 28 | - if ( isset( $_POST['give-action'] ) && 'edit_payment' == $_POST['give-action'] ) { | |
| 28 | + if ( ! is_numeric( $payment_id ) ) { | |
| 29 | 29 | return; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // Send email. |
| @@ -32,5 +32,5 @@ | ||
| 32 | 32 | // Send email. |
| 33 | 33 | give_email_donation_receipt( $payment_id ); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | -add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 ); | |
| 36 | +add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 ); | |