Skip to content

Commit 50eddbb

Browse files
committed
Final version bump to v5.2.1 for public release.
1 parent 55e1bc4 commit 50eddbb

18 files changed

Lines changed: 228 additions & 180 deletions

CHANGELOG.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
= 5.2.1 - 28/05/2026 =
2+
* Fix - Stripe order validation issue.
3+
* Fix - Membership upgrade action not available after disabling group add-on.
4+
* Fix - Custom emails addon cannot be enabled with plus plan even available in personal.
5+
* Fix - Nav menu items disappear for logged-out users when logout endpoint set to slash.
6+
* Fix - File upload addon shows upgrade to premium prompt despite user having an active plan.
7+
* Fix - Ensure meta_query is initialized before adding payment status condition in user payments query.
8+
19
= 5.2.0 - 20/05/2026 =
210
* Refactor - Members registration process.
311
* Refactor - Migrated PayPal integration from PayPal Standard to PayPal APIs.

assets/css/admin-rtl.css

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/css/admin.css

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/extensions-json/all-features.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797
"link": "https://docs.wpuserregistration.com/docs/content-restriction/?utm_source=dashboard-all-features&utm_medium=card-documentation-link",
9898
"released_date": "22/09/2017",
9999
"plan": [
100-
"plus",
101100
"personal",
101+
"plus",
102102
"professional",
103103
"themegrill agency"
104104
],
@@ -201,6 +201,7 @@
201201
"released_date": "12/01/2026",
202202
"plan": [
203203
"personal",
204+
"plus",
204205
"professional",
205206
"themegrill agency"
206207
],

assets/js/frontend/user-registration-recaptcha.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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,21 @@
10361036
proratedDiscountInput.text(
10371037
"-" + parseFloat(proratedDiscount).toFixed(2) + currency
10381038
);
1039+
1040+
if (totalDetails.discountAmount > 0) {
1041+
couponInput.closest(".urm-membership-coupons-value").show();
1042+
1043+
couponInput.text(
1044+
"-" +
1045+
parseFloat(totalDetails.discountAmount).toFixed(2) +
1046+
currency
1047+
);
1048+
} else {
1049+
couponInput.closest(".urm-membership-coupons-value").hide();
1050+
}
1051+
proratedDiscountInput.text(
1052+
"-" + parseFloat(proratedDiscount).toFixed(2) + currency
1053+
);
10391054
}
10401055

10411056
var hasDiscount =

includes/class-ur-form-handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ public static function process_reset_password() {
758758
}
759759

760760
if ( $posted_fields['password_1'] !== $posted_fields['password_2'] ) {
761-
$err_msg = apply_filters( 'user_registration_reset_password_error_message', __( 'New password must not be same as old password.', 'user-registration' ) );
761+
$err_msg = apply_filters( 'user_registration_reset_password_error_message', __( 'New passwords do not match.', 'user-registration' ) );
762762
ur_add_notice( $err_msg, 'error' );
763763
}
764764

includes/frontend/class-ur-frontend.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,23 @@ function ( $item, $key ) {
662662
$currency = empty( $currency ) ? get_option( 'user_registration_payment_currency', 'USD' ) : $currency;
663663

664664
$amount = $membership['billing_amount'] ?? '';
665+
if ( isset( $membership['post_content']['type'] ) && 'subscription' === $membership['post_content']['type'] && isset( $membership['post_content']['amount'] ) ) {
666+
$amount = (float) $membership['post_content']['amount'];
667+
668+
$subscription_last_order = $orders_repository->get_order_by_subscription( $membership['subscription_id'] );
669+
if ( ! empty( $subscription_last_order['ID'] ) ) {
670+
$tax_order_meta = $orders_repository->get_order_meta_by_order_id_and_meta_key( $subscription_last_order['ID'], 'tax_data' );
671+
$tax_data = ! empty( $tax_order_meta['meta_value'] ) ? json_decode( $tax_order_meta['meta_value'], true ) : array();
672+
$tax_rate = ! empty( $tax_data['tax_rate'] ) ? (float) $tax_data['tax_rate'] : 0;
673+
$is_exclusive = ! empty( $tax_data['tax_calculation_method'] );
674+
675+
if ( $tax_rate > 0 && $is_exclusive ) {
676+
$amount += round( $amount * $tax_rate / 100, 2 );
677+
}
678+
}
679+
680+
$amount = number_format( $amount, 2, '.', '' );
681+
}
665682

666683
if ( isset( $membership['post_content']['type'] ) && 'subscription' === $membership['post_content']['type'] ) {
667684

includes/functions-ur-core.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,12 +1249,6 @@ function ur_load_form_field_class( $class_key ) {
12491249
$class_path = apply_filters( 'user_registration_form_field_' . $class_key . '_path', $class_path );
12501250
/* Backward Compat since 1.4.0 */
12511251
if ( null != $class_path && file_exists( $class_path ) ) {
1252-
// Validate the resolved path to prevent directory traversal.
1253-
$real_class_path = realpath( $class_path );
1254-
$real_base_path = realpath( UR_FORM_PATH );
1255-
if ( false === $real_class_path || false === $real_base_path || 0 !== strpos( $real_class_path, $real_base_path . DIRECTORY_SEPARATOR ) ) {
1256-
return null;
1257-
}
12581252
$class_name = 'UR_' . join( '_', array_map( 'ucwords', $exploded_class ) );
12591253
if ( ! class_exists( $class_name ) ) {
12601254
include_once $class_path;

includes/functions-ur-page.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ function ur_nav_menu_items( $items ) {
316316
if ( ! is_user_logged_in() ) {
317317
$customer_logout = get_option( 'user_registration_logout_endpoint', 'user-logout' );
318318

319+
$customer_logout = trim( $customer_logout, '/' );
320+
319321
if ( ! empty( $customer_logout ) && is_array( $items ) ) {
320322
foreach ( $items as $key => $item ) {
321323
if ( empty( $item->url ) ) {

0 commit comments

Comments
 (0)