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).
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 rightcache_key
method (provided they themselves overrodecache_key
usingsuper
).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):