Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Fix breaking of cost text if multiple occurrences of currency amounts appear in
$cost
string value.Resolves strangerstudios/pmpro-subscription-delays#25
How to test the changes in this Pull Request:
0
Initial Payment, check Recurring Subscription, set Billing Amount to100
per1
Year(s). Set Subscription delay to
7`.200
Initial Payment, check Recurring Subscription, set Billing Amount to300.5
per1
Month(s). Set Subscription delay to
2022-01-23`4.1 Sub Delay level one: $0.00 now and then $100.00 per Year after your 7 day trial.
4.2 Sub Delay level two: $200.00 now and then $300.50 per Month starting January 23, 2022.
Yes
and save settings.7.1 Sub Delay level one: $0
7.2 Sub Delay level two: $200
9.1 Sub Delay level one: $0 now and then $100 per Year after your 7 day trial.
9.2 Sub Delay level two: $200 now and then $300.50 per Month starting January 23, 2022.
Screenshots
Default Level Cost Text
![211201-1638335933](https://user-images.githubusercontent.com/9744519/144182657-1489d6a3-55b7-4f57-80ec-e6bf7ef4eaac.png)
Level Cost Text before the patch
![211201-1638336086](https://user-images.githubusercontent.com/9744519/144182750-3af31b40-63fc-46fc-88ba-daa54064f5cc.png)
Level Cost Text after the patch
![211201-1638336365](https://user-images.githubusercontent.com/9744519/144182831-4e369006-ef71-43e5-a347-947e5f22f18c.png)
Level Cost Text after the patch - all PCLCT settings enabled
![211201-1638339889](https://user-images.githubusercontent.com/9744519/144183452-efd4aaed-0bd7-4ba3-b79c-4b1237ed54f0.png)
Other information:
Changelog entry