Billing window shows up, but then disappear imediately

When someone signs up to buy a course, as soon as they check out the fields in the billing information show up, but then disappear right away.
As a result, the page looks like this and you are not even able to click on the "billing" for it to expand and fields to show up.

  • Majid
    • Recruit

    Hey Gurjit,

    I hope you are doing great today!

    There was a jQuery plugin needed for the checkout page to work failing to load, and the cause is some WordPress plugin was trying to get it via an insecure request (HTTP) as you can see in the screenshot.

    By adding the following PHP code to your functions.php file, the checkout page should behave as it should.

    function enqueue_easing_script() {
    	wp_enqueue_script( 'easing', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js', array( 'jquery' ), false, true );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_easing_script', 999 );

    But I still have to debug this further and see which plugin is actually making the request, I will update this thread with my findings.
    Cheers,
    Majid

  • Majid
    • Recruit

    Hey Gurjit,

    It was actually your theme 'One Page' requesting the insecure easing.jquery file.
    I checked their website demo too, but they seem like they fixed it. maybe they will roll an update soon. for now you can use the code mentioned in the first reply, or try to edit the line 113 of functions.php and change it from:

    wp_enqueue_script('one-page-easing', 'http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js', array('jquery'), '', true);

    to

    wp_enqueue_script('one-page-easing', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js', array('jquery'), '', true);

    Majid

  • Majid
    • Recruit

    Hey Gurjit,

    After doing some testing, I found out that your theme was using the same class that our plugin uses in one of it's function (see attached). so basically the following code will let your theme (one page) finishes loading everything it need and then we can add the plugin needed class to keep it functioning as excepted.

    This will definitely solve the issue add it a the bottom of the theme's functions.php or inside and mu-plugin

    function script_current_conflict() {
        ?>
        <script type="text/javascript">
            (function($) {
                $(document).ready(function() {
                    $('#mp-checkout-form .mp_checkout_section:first').addClass('current');
                });
            })(jQuery);
        </script>
        <?php
    }
    add_action( 'wp_footer', 'script_current_conflict' );

    Majid

  • Majid
    • Recruit

    Well Apparently there is no other way left than modifying your theme's source code. to be exact this JavaScript file:
    themes/one-page/assets/js/custom.js : line 255

    The modification will now stop that line of code to execute when on checkout page.

    As you can see in the attachment the page now works as excepted.

    Also the attached zip file contains both old and new (custom.js) files.

    Let me know if there is anything else.

    Thanks,
    Majid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.