Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pass vars to frontend inside HTML #179

Open
erommel opened this issue Aug 24, 2020 · 1 comment
Open

Don't pass vars to frontend inside HTML #179

erommel opened this issue Aug 24, 2020 · 1 comment

Comments

@erommel
Copy link
Contributor

erommel commented Aug 24, 2020

Currently, vars for payment buttons are generated on server side and passed to frontend JS via wp_localize_script function (or analogue), which puts those in the HTML code of the page. This can cause some random issues on sites with excessive caching.

To prevent that, an experimental option can be added. When enabled, plugin won't pass the vars inside HTML page, but will be requesting those via AJAX on page load.

This has some disadvantages though. On slow websites, it would increase the time required for payment buttons (and payment pop-ups) to be operational.

@Arsenal21
Copy link
Owner

An experimental option sounds good for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants