Skip to content

Commit 88d8eb4

Browse files
committed
Final version bump to v5.2.5 for public release.
1 parent 31a73c9 commit 88d8eb4

15 files changed

Lines changed: 473 additions & 325 deletions

File tree

.github/sync-file-list.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
wpeverest/user-registration-pro@master:
1+
wpeverest/user-registration-pro@develop:
22
- assets
33
- includes
44
- modules

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Sync Files To Pro
22
on:
33
push:
44
branches:
5-
- master
5+
- develop
66
workflow_dispatch:
77
jobs:
88
sync:

CHANGELOG.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
= 5.2.5 - 07/07/2026 =
1+
= 5.2.5 - 08/07/2026 =
22
* Enhance - Defer expiry to period end.
33
* Enhance - Pin Stripe subscription payment method for reliable renewals.
44
* Fix - User and admin email order.
55
* Fix - Payment fail case for paypal.
66
* Fix - Lost Password Carrot adjustment.
77
* Fix - Unnecessary payment retry checks.
88
* Fix - Required Nonce Error on registration.
9+
* Fix - Fatal error on WooCommerce shop page.
910
* Fix - Setup wizard membership duration issue.
1011
* Fix - Loader timing issue during registration.
1112
* Fix - Unwanted settings showing up in free version.
@@ -19,6 +20,7 @@
1920
* Fix - Use server membership state for multiple-membership policy.
2021
* Fix - Block tampered PayPal payments from activating memberships.
2122
* Fix - Stripe payment and nonce validation failed on Membership form.
23+
* Fix - Field Visibility add-on hides fields in My Account read-only profiles.
2224
* Fix - Security: prevent unauthorized login during membership signup payment.
2325
* Fix - Check coupon eligibility before discount on public membership purchase.
2426
* Fix - Super admin bypass missing for admin content access in membership rules.

assets/js/admin/ur-notice.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/frontend/user-registration.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/modules/membership/frontend/user-registration-membership-frontend.js

Lines changed: 99 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
var elements = {};
44
var stripe_mode_validated = false;
55
var validated_stripe_pm_id = null;
6+
var stripe_card_state = { complete: false, error: null };
7+
var stripe_validation_in_progress = false;
68
var ur_membership_frontend_utils = {
79
/**
810
* Appends a spinner element to the specified element.
@@ -478,6 +480,25 @@
478480
};
479481

480482
elements.card.emit("change", event);
483+
} else if (!stripe_card_state.complete) {
484+
// Card element has input but Stripe.js reports it
485+
// incomplete/invalid (e.g. missing postal code).
486+
// Block the submit here, before the registration
487+
// request creates the user, instead of letting
488+
// confirmCardPayment fail afterwards.
489+
no_errors = false;
490+
var incomplete_event = {
491+
error: {
492+
message:
493+
stripe_card_state.error &&
494+
stripe_card_state.error.message
495+
? stripe_card_state.error.message
496+
: urmf_data.labels
497+
.i18n_empty_card_details
498+
}
499+
};
500+
501+
elements.card.emit("change", incomplete_event);
481502
}
482503
}
483504
});
@@ -1660,6 +1681,7 @@
16601681
});
16611682
},
16621683
handle_authorize_multiple_purchase: function (
1684+
submittedData,
16631685
selected_membership_id,
16641686
selected_pg,
16651687
btn,
@@ -1681,7 +1703,11 @@
16811703
action: "user_registration_membership_add_multiple_membership",
16821704
selected_membership_id: data.selected_membership_id,
16831705
selected_pg: data.selected_pg,
1684-
ur_authorize_data: data.ur_authorize_data
1706+
ur_authorize_data: data.ur_authorize_data,
1707+
form_data: submittedData.form_data,
1708+
coupon: submittedData.coupon,
1709+
form_id: submittedData.form_id,
1710+
type: data.type
16851711
},
16861712
{
16871713
success: function (response) {
@@ -2157,6 +2183,13 @@
21572183
elements.card.addEventListener("change", function (e) {
21582184
stripe_mode_validated = false;
21592185
validated_stripe_pm_id = null;
2186+
// Genuine Stripe change events always carry a boolean `complete`;
2187+
// synthetic events emitted from validate_membership_form don't,
2188+
// and must not overwrite the tracked card state.
2189+
if (typeof e.complete !== "undefined") {
2190+
stripe_card_state.complete = e.complete;
2191+
stripe_card_state.error = e.error || null;
2192+
}
21602193
if (e.error) {
21612194
stripe_settings.show_stripe_error(e.error.message);
21622195
} else {
@@ -2269,7 +2302,6 @@
22692302
prepare_members_data,
22702303
form_response
22712304
);
2272-
ur_membership_frontend_utils.hide_payment_processing_overlay();
22732305
});
22742306
},
22752307
update_order_status: function (
@@ -3177,9 +3209,61 @@
31773209
return;
31783210
}
31793211

3180-
stripe_settings.show_stripe_error(
3181-
urmf_data.labels.i18n_validating_stripe_card
3212+
// Prevent double submission
3213+
if (stripe_validation_in_progress) return;
3214+
stripe_validation_in_progress = true;
3215+
3216+
var $submit_button =
3217+
$form && $form.length
3218+
? $form.find(".ur-submit-button")
3219+
: $(".ur-submit-button");
3220+
$submit_button.prop("disabled", true);
3221+
$submit_button
3222+
.find("span")
3223+
.addClass("ur-front-spinner");
3224+
3225+
// The core submit handler's `#stripe-errors:visible` guard is
3226+
// what stops this first submit from racing straight to
3227+
// registration while the card is still being validated (the
3228+
// button's own disabled state only protects *later* clicks,
3229+
// not this first synchronous pass). We still need that
3230+
// element to exist, but the user already sees the button's
3231+
// spinner, so this one is collapsed out of the layout
3232+
// entirely (zero size, taken out of normal flow) rather
3233+
// than just visually hidden — otherwise the `.user-
3234+
// registration-error` class's own border/padding still
3235+
// renders an empty box and reserves a gap. jQuery's
3236+
// `:visible` only requires the element to generate a box
3237+
// (any `getClientRects()` entry) — it doesn't need to have
3238+
// non-zero size — so this still satisfies that guard.
3239+
var $validating_marker = $(
3240+
'<label id="stripe-errors" class="user-registration-error" role="alert" style="position:absolute;width:0;height:0;margin:0;padding:0;border:0;overflow:hidden;"></label>'
31823241
);
3242+
$membership_registration_form
3243+
.find(".stripe-container")
3244+
.closest(".ur_membership_frontend_input_container")
3245+
.append($validating_marker);
3246+
3247+
// show_stripe_error() reuses an existing #stripe-errors
3248+
// element via .show(), which only toggles `display` and
3249+
// would leave the marker's collapsing inline styles in
3250+
// place — silently hiding a real error. Remove the marker
3251+
// first so a genuine failure always renders a fresh,
3252+
// fully-visible label.
3253+
var show_real_stripe_error = function (message) {
3254+
$membership_registration_form
3255+
.find("#stripe-errors")
3256+
.remove();
3257+
stripe_settings.show_stripe_error(message);
3258+
};
3259+
3260+
var release_submit = function () {
3261+
stripe_validation_in_progress = false;
3262+
$submit_button.prop("disabled", false);
3263+
$submit_button
3264+
.find("span")
3265+
.removeClass("ur-front-spinner");
3266+
};
31833267

31843268
elements.stripe
31853269
.createPaymentMethod({
@@ -3188,9 +3272,10 @@
31883272
})
31893273
.then(function (pmResult) {
31903274
if (pmResult.error) {
3191-
stripe_settings.show_stripe_error(
3275+
show_real_stripe_error(
31923276
pmResult.error.message
31933277
);
3278+
release_submit();
31943279
return;
31953280
}
31963281

@@ -3209,23 +3294,30 @@
32093294
validated_stripe_pm_id =
32103295
pmResult.paymentMethod.id;
32113296
stripe_mode_validated = true;
3297+
stripe_validation_in_progress = false;
32123298
if ($form && $form.length) {
32133299
$form
32143300
.find(".ur-submit-button")
32153301
.prop("disabled", false);
32163302
$form.submit();
32173303
}
32183304
} else {
3219-
stripe_settings.show_stripe_error(
3305+
show_real_stripe_error(
32203306
response.data &&
32213307
response.data.message
32223308
? response.data.message
32233309
: urmf_data.labels
32243310
.i18n_stripe_mode_error
32253311
);
3312+
release_submit();
32263313
}
32273314
}
3228-
);
3315+
).fail(function () {
3316+
release_submit();
3317+
});
3318+
})
3319+
.catch(function () {
3320+
release_submit();
32293321
});
32303322
}
32313323
);

assets/js/modules/membership/frontend/user-registration-membership-frontend.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)