Fix Visa Checkout Async Error
Budget: $10 – $30 USD
During a cold load of the checkout page I’m getting a null-reference break inside SecureAcceptance.js – specifically the .split() call. The moment WooCommerce assets are cached (e.g., I hit F5) the iFrame renders fine, so the root of the problem is clear: the official Visa script is firing before wc-checkout has finished loading.
Environment
• WooCommerce: latest stable release
• Caching: I have already purged all layers of cache; the issue persists
What I need
1. Make the Visa Secure Acceptance script load strictly after wc-checkout, either by declaring a hard dependency or by tying its initialisation to WooCommerce’s updated_checkout event.
2. Ensure the fix survives future plugin or core updates (child theme or custom hook approach preferred).
3. Confirm no residual console errors appear on a true first-time visit (incognito, cache disabled).
4. Provide a brief note of the changes so I can track them in version control.
Deliverable
A working checkout where the Visa iFrame renders correctly on the very first page load, with your code snippets / hook additions documented.
Environment
• WooCommerce: latest stable release
• Caching: I have already purged all layers of cache; the issue persists
What I need
1. Make the Visa Secure Acceptance script load strictly after wc-checkout, either by declaring a hard dependency or by tying its initialisation to WooCommerce’s updated_checkout event.
2. Ensure the fix survives future plugin or core updates (child theme or custom hook approach preferred).
3. Confirm no residual console errors appear on a true first-time visit (incognito, cache disabled).
4. Provide a brief note of the changes so I can track them in version control.
Deliverable
A working checkout where the Visa iFrame renders correctly on the very first page load, with your code snippets / hook additions documented.
Related categories:
PHP
JavaScript
WordPress
HTML
WooCommerce
Web Development
Frontend Development
Web Design