Currently the '[give_totals]' shortcode sums all the donations ever received (filtered by form id, category or tag if set).
This snippet allows the user to add a 'start_date' option so only donations since that date are totalled and displayed.
This means users can, for example, set a goal for the amount to raise this year and show: "So far this year we've raised $xxx thanks to our generous donors." or, with the '{start_date}' message placeholder: "Since 1 January 2021 we've raised...".
Affects
[give_totals] shortcode
Visuals
Testing Instructions
Pre-review Checklist
Hi! I'm not a developer - I just write code snippets from time to time when I need them - and I'm not yet very familiar with GitHub so I may have submitted all this incorrectly. If so, please accept my apologies; any guidance on how to do it properly would be appreciated. I've tried to follow the documented procedures I can find so if you get this, I hope it's useful!
[ ] Acceptance criteria satisfied and marked in related issue
[ ] Relevant @since tags included in DocBlocks
[ ] Changes logged to the Unreleased section of CHANGELOG.md
Adds
start_date
option and{start_date}
message placeholder to[give_totals]
shortcode.Resolves # https://feedback.givewp.com/feature-requests/p/date-filter-for-the-progress-bar
Review requested.
Description
Currently the '[give_totals]' shortcode sums all the donations ever received (filtered by form id, category or tag if set). This snippet allows the user to add a 'start_date' option so only donations since that date are totalled and displayed. This means users can, for example, set a goal for the amount to raise this year and show: "So far this year we've raised $xxx thanks to our generous donors." or, with the '{start_date}' message placeholder: "Since 1 January 2021 we've raised...".
Affects
[give_totals]
shortcodeVisuals
Testing Instructions
Pre-review Checklist
Hi! I'm not a developer - I just write code snippets from time to time when I need them - and I'm not yet very familiar with GitHub so I may have submitted all this incorrectly. If so, please accept my apologies; any guidance on how to do it properly would be appreciated. I've tried to follow the documented procedures I can find so if you get this, I hope it's useful!
@since
tags included in DocBlocksUnreleased
section ofCHANGELOG.md