-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom price_for_options method to variant
We need to safely ensure the new price_for_options method in the price selector will not break for those that have a custom price selector. If the new method is defined in the price selector class this will behave normally, and if their customization does not allow for it, we will instead return an unpersisted Spree::Price from the Spree::Money object that the deprecated price_for method returns. Spree::Product can now delegate price_for_options to master variant
- Loading branch information
Mike Conlin
committed
Mar 25, 2021
1 parent
260ef49
commit 9321d04
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters