Skip to content

Commit

Permalink
Revert "feature: add update function"
Browse files Browse the repository at this point in the history
This reverts commit 88785ea.
  • Loading branch information
glaubersilva committed Dec 13, 2023
1 parent 88785ea commit 7db420a
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/Revenue/Repositories/Revenue.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Give\Donations\Models\Donation;
use Give\Framework\Database\DB;
use Give\Framework\Exceptions\Primitives\InvalidArgumentException;
use Give\Framework\Support\ValueObjects\Money;

/**
* Class Revenue
Expand Down Expand Up @@ -47,29 +48,6 @@ public function insert($revenueData)
);
}

/**
* Update revenue.
*
* @unreleased
*
* @return bool|int
*/
public function update(array $revenueData)
{
global $wpdb;

// Validate revenue data
$this->validateNewRevenueData($revenueData);

return DB::update(
$wpdb->give_revenue,
$revenueData,
['donation_id' => $revenueData['donation_id']],
['%d'],
['%d']
);
}

/**
* Deletes revenue
*
Expand Down

0 comments on commit 7db420a

Please sign in to comment.