Skip to content

Commit

Permalink
fix(donation): update donation amount only when property set
Browse files Browse the repository at this point in the history
ref #3304
  • Loading branch information
ravinderk committed Jun 1, 2018
1 parent d4e95e2 commit ae89449
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/payments/class-give-payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,10 @@ public function save() {
wp_update_post( $args );
break;

case 'total':
$this->update_meta( '_give_payment_total', give_sanitize_amount_for_db( $this->total ) );
break;

default:
/**
* Fires while saving payment.
Expand Down Expand Up @@ -994,11 +998,8 @@ public function save() {

// Verify and update form meta based on the form status.
give_set_form_closed_status( $this->form_id );

}

$this->update_meta( '_give_payment_total', give_sanitize_amount_for_db( $this->total ) );

$this->pending = array();
$saved = true;
}// End if().
Expand Down

0 comments on commit ae89449

Please sign in to comment.