diff --git a/src/Revenue/Repositories/Revenue.php b/src/Revenue/Repositories/Revenue.php index 59ef852a5b..2326a8c384 100644 --- a/src/Revenue/Repositories/Revenue.php +++ b/src/Revenue/Repositories/Revenue.php @@ -5,7 +5,6 @@ use Give\Donations\Models\Donation; use Give\Framework\Database\DB; use Give\Framework\Exceptions\Primitives\InvalidArgumentException; -use Give\Framework\Support\ValueObjects\Money; /** * Class Revenue @@ -66,6 +65,24 @@ public function deleteByDonationId($revenueId) ); } + /** + * @unreleased + * + * @return false|int + */ + public function updateFundId(int $fundId, Donation $donation) + { + global $wpdb; + + return DB::update( + $wpdb->give_revenue, + ['fund_id' => $fundId], + ['donation_id' => $donation->id], + ['%d'], + ['%d'] + ); + } + /** * @since 2.22.1 *