Custom PDF Receipts should not revert to Other Templates after a period of time.
complete
Zack Jenkins
The custom PDF template reverts to another template after a certain period of time and begins to send those templates instead of the originally saved template. The workaround is to "Save" the template periodically.
Ben Meredith
So far, the team has been unable to reliably replicate this issue, which has made it difficult to resolve. We're still monitoring this, but until we can replicate the issue, we're relatively stuck. Please comment here with specific steps to reliably replicate this problem.
Our hunch is that this is related to caching at the server/host level since it is only happening to a handful of folks. We're happy to get to the bottom of this, but need a way to reproduce it.
Ben Meredith
complete
This should be resolved in version 2.13.11 of the GiveWP PDF receipts add-on.
Please let us know if you are still having issues here, and we'll have a look!
Ante Laca
under review
B
Bruno Bueno
Ben Meredith - I was able to install just now a fresh WordPress with the plugin and replicated it. It doesn't make any sense that you're not able to replicate it. This is a solid and consistent issue. Perhaps, the steps to replicate are not clear?
B
Bruno Bueno
Ben Meredith I believe the extra information I have posted here can help your team to track and fix the bug.
B
Bruno Bueno
Replicable steps:
- On Donations > Settings > PDF Receiptshave the options below set:
- PDF Receipts: Enabled
- Generation Method: Custom PDF Builder
- Receipt Template: [Have a customized option selected here]
- Create a new donation form or edit an existing one with PDF Receipt option set as “Global option”;
Expected behaviour:
Do not touch the global settings, do not recreate nor reprocess the customized template defined globally in the system.
Actual behaviour:
Every time a donation form is saved, even if “Global option” is set for PDF receipt, it will edit the global customized template.
Troubleshoot breakpoints:
- Relevant POST parameters submitted even though Global option is chosen:
give_pdf_receipts_enable_disable: global
give_pdf_generation_method: custom_pdf_builder
give_pdf_receipt_template: [ID of the global customized template]
give_pdf_receipt_template_name: Customized option
give_pdf_builder: [ Full HTML of the global customized template ]
- Processing causing the issue:
- give-pdf-receipts/src/Helpers/Admin/Settings.php
- Function SaveCustomTemplate(); (Invoked every time a new donation form is saved or updated, regardless of the options chosen)`
- Line causing the problem: 59 (Plugin PDF Receipt version: v2.3.10)`
- Temporary fix adopted:
- Added on line 23 of the causing file:
// If donation form PDF receipt template option is to use global, skip editing/saving it.
$formTemplateOption = isset( $_POST['give_pdf_receipts_enable_disable'] ) ? $_POST['give_pdf_receipts_enable_disable'] : '';
if ( $formTemplateOption == 'global') {
return;
}
Ben Meredith
So far, the team has been unable to reliably replicate this issue, which has made it difficult to resolve. We're still monitoring this, but until we can replicate the issue, we're relatively stuck. Please comment here with specific steps to reliably replicate this problem.
Our hunch is that this is related to caching at the server/host level since it is only happening to a handful of folks. We're happy to get to the bottom of this, but need a way to reproduce it.
Ante Laca
under review