public function decrease_earnings($amount)
{
$earnings = give_get_form_earnings_stats($this->ID);
if ($earnings > 0) {
// Only decrease if greater than zero
$new_amount = $earnings - (double) $amount;
if ($this->update_meta('_give_form_earnings', $new_amount)) {
$this->earnings = $new_amount;
return $this->earnings;
}
}
return false;
}