solidusio / solidus_paypal_commerce_platform

💳 Integrate Solidus with Paypal Commerce Platform
https://developer.paypal.com/docs/platforms/
BSD 3-Clause "New" or "Revised" License
17 stars 24 forks source link

Do not break custom pricing options classes #181

Closed mamhoff closed 1 year ago

mamhoff commented 1 year ago

Summary

Prior to this commit, installing this gem would break custom pricing options classes in host apps: By overriding the getter on Spree::Config, it was very difficult to use a custom pricing options class. By instead decorating the base class, we make sure that even if host app developers have used their own pricing options class, that pricing options class gets the right cache_key method (provided they themselves overrode cache_key using super).

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed (~cross them out~ if they are not):

kennyadsl commented 1 year ago

Thanks Martin!