• Resolved Jairo Ochoa

    (@jairoochoa)


    Hi

    I get this message error because a script is enqueued before jQuery

    Uncaught TypeError: jQuery(…).on is not a function

    This is the script:

            <script>
    jQuery(document).on('dlm-xhr-modal-data', function(e, data, headers) {
    if ('undefined' !== typeof headers['x-dlm-tc-required']) {
    data['action'] = 'dlm_terms_conditions_modal';
    data['dlm_modal_response'] = 'true';
    }
    });
    </script>

    It’s located here: /download-monitor/src/TermsAndConditions/classes/class-dlm-tc-modal.php

    I fix it simply changing

    add_action( 'wp_footer', array( $this, 'add_footer_scripts' ) );

    by

    add_action( 'wp_footer', array( $this, 'add_footer_scripts' ), 99 );

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.