• I’ve been looking at error logs and noticed a lot of javascript reference errors coming from Paysera plugin. The underlying issue is pretty simple:

    Plugin is loading assets/js/delivery/frontend.ajax.js file which depends on jQuery:

    jQuery(document).ready(function($) {
        $('.paysera-delivery-terminal-country-selection').on('select2:select', function (e) {
    ...

    This file is registered in woo-payment-gateway-paysera/src/PayseraInit.php, but a dependency for jQuery is not specified:

    wp_register_script(
                'paysera-delivery-frontend-ajax-js',
                PayseraPaths::PAYSERA_DELIVERY_FRONTEND_AJAX_JS,
                [], // missing jquery dependency.
                false,
                true
            );

    When jQuery is loaded after the the frontend.ajax.js a script throws a reference error.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘JS errors’ is closed to new replies.