Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compatible with jQuery v3.0. Replace deprecated functions. #1127

Open
bridgeport opened this issue Dec 11, 2017 · 1 comment
Open

Make compatible with jQuery v3.0. Replace deprecated functions. #1127

bridgeport opened this issue Dec 11, 2017 · 1 comment

Comments

@bridgeport
Copy link

EXPLANATION OF THE ISSUE

The s2member JavaScript file /wp-content/plugins/s2member/s2member-o.php uses functions that are deprecated in jQuery 3.0.

Using:

  • s2member v170722 (with Pro add-on)
  • WordPress 4.9
  • jQuery 3.2.1
  • jQuery Migrate 3.0.0

This is just a heads up, as these functions still exist in v3.0, but may be removed in the next major version.

STEPS TO REPRODUCE THE ISSUE

Visit a page that loads the s2member JavaScript file (e.g., authorize.net or paypal checkout page) with jQuery 3 and jQuery migrate loaded, and it'll report the following within console.log()

JQMIGRATE: jQuery.fn.removeAttr no longer sets boolean properties: disabled
JQMIGRATE: jQuery.fn.bind() is deprecated

The following page lists the jQuery deprecation warnings and how to resolve them:
https://github.com/jquery/jquery-migrate/blob/master/warnings.md

Solution for jQuery.fn.removeAttr():
https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryfnremoveattr-no-longer-sets-boolean-properties

Solution for jQuery.fn.bind():
https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryfnbind-is-deprecated

Thanks.

@KTS915
Copy link

KTS915 commented Dec 19, 2017

WordPress doesn't use jQuery v3. It uses v1.12. s2Member reflects that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants