The Trusted Membership Platform That Grows with You: Restrict access to content and charge recurring subscriptions using Stripe, PayPal, and more. Fully open source. 100% GPL.
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. To retrieve and change DOM properties such as the checked, selected, readonly or disabled state of form elements, use the [.prop()](https://api.jquery.com/prop/) method.
In your jQuery code there are some parts where attr() is used instead of the correct prop() for getting and setting these states.
According to this link https://api.jquery.com/attr/:
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. To retrieve and change DOM properties such as the checked, selected, readonly or disabled state of form elements, use the [.prop()](https://api.jquery.com/prop/) method.
In your jQuery code there are some parts where
attr()
is used instead of the correctprop()
for getting and setting these states.Some examples:
https://github.com/strangerstudios/paid-memberships-pro/blob/1504409e7833f9304922b828b22249a1b625cb28/includes/profile.php#L185
https://github.com/strangerstudios/paid-memberships-pro/blob/4812f157e759a38b2d22cf56be728cc00592af07/js/pmpro-checkout.js#L39
https://github.com/strangerstudios/paid-memberships-pro/blob/4812f157e759a38b2d22cf56be728cc00592af07/js/pmpro-checkout.js#L49
https://github.com/strangerstudios/paid-memberships-pro/blob/38c18597d4b0eee457d777f67c3223a9b42e28b4/js/pmpro-admin.js#L429