Skip to content

Commit

Permalink
Fixed a few missed whereWooId methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Jnesselr committed Jan 23, 2024
1 parent 5cb4900 commit b75b3aa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/External/WooCommerce/ProcessWebhookJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected function customerIdFromUserMembershipId($id): ?int
protected function customerIdFromSubscriptionId($id): ?string
{
/** @var Subscription $subscription */
$subscription = Subscription::whereWooId($id)->first();
$subscription = Subscription::find($id)->first();

if (! is_null($subscription)) {
return $subscription->customer_id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function fix(): bool
return $this->issueFixChoice()
->option('Delete local subscription', function () {
/** @var Subscription $subscription */
$subscription = Subscription::whereWooId($this->subscription_id)->first();
$subscription = Subscription::find($this->subscription_id)->first();

MembershipAggregate::make($subscription->customer_id)
->deleteSubscription(['id' => $subscription->id])
Expand Down
1 change: 0 additions & 1 deletion app/Models/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
* @property ?int id_was_checked_by_id
* @property ?Customer idWasCheckedBy
*
* @method static Builder whereWooId($customerId)
* @method static Builder whereSlackId($slackId)
*/
class Customer extends Model
Expand Down

0 comments on commit b75b3aa

Please sign in to comment.