Viewing 2 replies - 1 through 2 (of 2 total)
  • Create a file in your must-use plugins folder:
    “/wp-content/mu-plugins/the-file-name-does-not-matter.php”

    and put the following:

    <?php
    // remove s2member javascript
    function remove_s2_js()
    {
        wp_dequeue_script('ws-plugin--s2member');
    }
    add_action('ws_plugin__s2member_during_add_js_w_globals', 'remove_s2_js');

    But I would caution you to review this before doing so:
    https://www.s2member.com/forums/topic/disable-s2members-js-validation-for-my-own/

    For the Pro forms, there are certain capabilities you’ll lose by disabling s2member’s custom JS. For instance, it won’t have the ability to recognize logged in users, which S2 uses to disable certain form fields such as username/password. It also won’t have the ability to require “custom” registration fields by filled out. For instance, if you have a terms and conditions checkbox, there’s no server-side check to validate and require it.

    If you’re dumping client-side S2 javascript validation, you may want to consider rolling your own javascript validation using something such as http://parsleyjs.org/

    Thread Starter krimark

    (@krimark)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable javascript alert on registration’ is closed to new replies.