| @@ -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. |