Closed glaubersilva closed 1 year ago
This issue has been linked to a Canny post: PDF Receipt download link isn't generating for some gateways :tada:
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.
User Story
When the update method from the donation repository is used, the cache for the post updated is not cleared and it can generate inconsistent results when the WP native functions that rely on this post cache are used.
Expected Behavior
After updating a donation, the post cache related to it should be cleared.
Steps to Reproduce
'pending'
to'publish'
using model functions like$donation->save()
;get_post_status()
function native from WP and you'll see that the status still will be'pending'
instead of'publish'
.Additional Context
This problem is preventing the give_is_payment_complete() function from the Give core to return the correct value and this is directly affecting the is_receipt_link_allowed() function from the PDF recipes addon that relies on the return of the first function mentioned. As result, this bug is preventing the "Download Receipt" link to be available in the e-mail sent to the donors.
Visuals
Acceptance Criteria