restezconnectes / send-pdf-for-contact-form-7

Send the PDF for Contact Form 7 plugin will allow you to recover the data yourself via your form to insert them into a PDF built and prepared by you.
https://restezconnectes.fr/tutoriel-wordpress-lextension-send-pdf-for-contact-form-7/
GNU General Public License v3.0
15 stars 17 forks source link

unset( $_SESSION['pdf_uniqueid'] ) is caching #21

Closed timostsauber closed 2 years ago

timostsauber commented 2 years ago

If you have any sort of caching enabled then the uniqueid will not work properly e.g. unset( $_SESSION['pdf_uniqueid'] ) won't work as expected, because isset( $_SESSION['pdf_uniqueid'] ) will sometimes grab a cached version of the value.

Of course this can be fixed with changes to the server config or headers, but thats not preferable as it wont work for everybody. This is likely why WordPress has stopped using $_SESSION to store data, and utilises the database instead.

Do you have any plans of moving from $_SESSION to database storage to keep inline with current WordPress best practices?

restezconnectes commented 2 years ago

Hi!

For the lastest verion, I removed usage SESSIONS, I use TRANSIENT instead

Does it work for you?