Closed skeemer closed 7 months ago
Hi @skeemer. What do you mean with update_price
? That method doesn't exist in Cashier.
I do agree sending along extra parameter options could be useful. But unfortunately we cannot change the method signatures on a patch release. I'm also not really comfortable polluting the public API with extra methods just to make this happen. So I guess the right option here is to target Cashier Stripe v16. If you can send in a PR we can have a look.
I btw don't know when we'd release that. For now, I suggest to copy the quantity methods into a new method you manage yourself and then swap them for the updated method whenever Cashier v16 gets released.
Thanks!
I meant updateQuantity(). It would just be adding the $options array parameter the same way addPrice() and swap() do it. I don't think there would be any new methods.
. It would just be adding the $options array parameter
Yeah that's what I'm trying to tell. We cannot do that. It'll be a breaking change. For example, any apps overwriting that method will break because the method signature doesn't matches anymore. It'll have to go into the next release.
This works for add_price() and swap() because they have $options[] that get merged.
My suggestion is to do the same thing for update_price() and all of the increment/decrement functions that pass down to it. This would be for Subscription and SubscriptionItem.
I'm willing to put together the PR if that is an acceptable solution.