Skip to content

Commit

Permalink
Fix PaddleBilling subscription name bug not using the default name
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Oct 27, 2023
1 parent b82c1b3 commit 5b4c652
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/pay/paddle_billing/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.sync_from_transaction(transaction_id)
sync(transaction.subscription_id) if transaction.subscription_id
end

def self.sync(subscription_id, object: nil)
def self.sync(subscription_id, object: nil, name: Pay.default_product_name)
# Passthrough is not return from this API, so we can't use that
object ||= ::Paddle::Subscription.retrieve(id: subscription_id)

Expand All @@ -47,7 +47,6 @@ def self.sync(subscription_id, object: nil)

if object.items&.first
item = object.items.first
attributes[:name] = item.price.description
attributes[:processor_plan] = item.price.id
attributes[:quantity] = item.quantity
end
Expand Down

0 comments on commit 5b4c652

Please sign in to comment.