Closed Benunc closed 4 years ago
I fixed the snippet - essentially I had to rewrite it using the proper hook to update the status so it reflects properly in the goal.
See snippet now: https://github.com/impress-org/givewp-snippet-library/blob/master/gateway-customizations/offline-auto-complete.php
Overview
This snippet works to set the status to complete automatically: https://github.com/impress-org/give-snippet-library/blob/master/gateway-customizations/offline-auto-complete.php
It does NOT reflect in the goal progress bar until the stats are recalculated using the tools at Donations > Tools > Data
Steps to replicate
Possible solution
Somehow incorporate
give_update_payment_status()
into that function, to fully simulate the manual process of updating an offline donation to complete.