Skip to content

Commit

Permalink
Version bump to 3.3.3
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 965e2a5
Author: Prajjwal Poudel <[email protected]>
Date:   Wed Sep 18 14:33:43 2024 +0545

    Tweak - Install pages notice display only if continue setup wizard notice is skipped

commit 7b19cde
Merge: 809bbe8 d0a076e
Author: Prajjwal Poudel <[email protected]>
Date:   Wed Sep 18 13:39:36 2024 +0545

    Resolve merge conflicts

commit 809bbe8
Author: Prajjwal Poudel <[email protected]>
Date:   Wed Sep 18 13:38:31 2024 +0545

    Fix - Continue setup wizard not working properly

commit d0a076e
Author: Lekhnath Pandey <[email protected]>
Date:   Wed Sep 18 12:46:52 2024 +0545

    Fix - Conflict with lost password when Woocommerce My Account Page selected in user registration settings

commit 38bdcce
Author: Prajjwal Poudel <[email protected]>
Date:   Wed Sep 18 09:51:12 2024 +0545

    Tweak - Changed feature item label from Pro to Personal to avoid confusion

commit be7d433
Author: Prajjwal Poudel <[email protected]>
Date:   Mon Sep 16 17:33:54 2024 +0545

    Tweak - Added skip setup button in continue setup wizard notice

commit 44138c8
Author: Prajjwal Poudel <[email protected]>
Date:   Wed Sep 11 12:57:35 2024 +0545

    Fix - Select All not working in checkbox field
  • Loading branch information
iamprazol committed Sep 19, 2024
1 parent d40b04f commit 0f0fb88
Show file tree
Hide file tree
Showing 21 changed files with 1,001 additions and 2,065 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
= 3.3.3 - 19/09/2024 =
* Fix - Select all option not working in checkbox field.
* Fix - Continue setup wizard button not working properly.
* Fix - Conflict with lost password when WooCommerce My Account Page selected in user registration settings.
* Tweak - Added skip setup button in continue setup wizard notice.
* Tweak - Added filters to change reset password validation error message.
* Tweak - Changed feature item label from Pro to Personal to avoid confusion.
* Tweak - Install pages notice display only if continue setup wizard notice is skipped.

= 3.3.2.1 - 11/09/2024 =
* Fix - Tooltip icon is not being displayed in Global Settings.

Expand Down Expand Up @@ -31,7 +40,11 @@
* Dev - Compatibility for Authorize.net Addon.
* Dev - Compatibility for SMS verification.
* Dev - Add noreferer and noopener in all target blank anchor tags.
<<<<<<< HEAD
* Fix - Unable to publish form from draft status.
=======
* Fix - Unable to publish form from draft status.
>>>>>>> master
* Fix - Undefined variable $form_row_data.
* Fix - Disable default wordpress login not working.
* Fix - The email content translation issues with WPML plugin.
Expand Down
3 changes: 3 additions & 0 deletions assets/css/activation-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@
right: 0;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out; }

.wpb-content-layouts .icon-wpb-vc_user_registration {
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI3LjU4IDRhMjcuOSAyNy45IDAgMCAwLTUuMTcgNCAyNyAyNyAwIDAgMC00LjA5IDUuMDggMzMuMDYgMzMuMDYgMCAwIDEgMiA0LjY1QTIzLjc4IDIzLjc4IDAgMCAxIDI0IDEyLjE1VjE4YTggOCAwIDAgMS01Ljg5IDcuNzJsLS4yMS4wNWEyNyAyNyAwIDAgMC0xLjktOC4xNkEyNy45IDI3LjkgMCAwIDAgOS41OSA4YTI3LjkgMjcuOSAwIDAgMC01LjE3LTRMNCAzLjc3VjE4YTEyIDEyIDAgMCAwIDkuOTMgMTEuODJoLjE0YTExLjcyIDExLjcyIDAgMCAwIDMuODYgMGguMTRBMTIgMTIgMCAwIDAgMjggMThWMy43N3pNOCAxOHYtNS44NWEyMy44NiAyMy44NiAwIDAgMSA1Ljg5IDEzLjU3QTggOCAwIDAgMSA4IDE4em04LTE2YTMgMyAwIDEgMCAzIDMgMyAzIDAgMCAwLTMtM3oiLz48L3N2Zz4=") !important; }
3 changes: 3 additions & 0 deletions assets/css/activation.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@
left: 0;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out; }

.wpb-content-layouts .icon-wpb-vc_user_registration {
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI3LjU4IDRhMjcuOSAyNy45IDAgMCAwLTUuMTcgNCAyNyAyNyAwIDAgMC00LjA5IDUuMDggMzMuMDYgMzMuMDYgMCAwIDEgMiA0LjY1QTIzLjc4IDIzLjc4IDAgMCAxIDI0IDEyLjE1VjE4YTggOCAwIDAgMS01Ljg5IDcuNzJsLS4yMS4wNWEyNyAyNyAwIDAgMC0xLjktOC4xNkEyNy45IDI3LjkgMCAwIDAgOS41OSA4YTI3LjkgMjcuOSAwIDAgMC01LjE3LTRMNCAzLjc3VjE4YTEyIDEyIDAgMCAwIDkuOTMgMTEuODJoLjE0YTExLjcyIDExLjcyIDAgMCAwIDMuODYgMGguMTRBMTIgMTIgMCAwIDAgMjggMThWMy43N3pNOCAxOHYtNS44NWEyMy44NiAyMy44NiAwIDAgMSA1Ljg5IDEzLjU3QTggOCAwIDAgMSA4IDE4em04LTE2YTMgMyAwIDEgMCAzIDMgMyAzIDAgMCAwLTMtM3oiLz48L3N2Zz4=") !important; }
4 changes: 4 additions & 0 deletions assets/css/activation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@
}
}
}

.wpb-content-layouts .icon-wpb-vc_user_registration{
background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI3LjU4IDRhMjcuOSAyNy45IDAgMCAwLTUuMTcgNCAyNyAyNyAwIDAgMC00LjA5IDUuMDggMzMuMDYgMzMuMDYgMCAwIDEgMiA0LjY1QTIzLjc4IDIzLjc4IDAgMCAxIDI0IDEyLjE1VjE4YTggOCAwIDAgMS01Ljg5IDcuNzJsLS4yMS4wNWEyNyAyNyAwIDAgMC0xLjktOC4xNkEyNy45IDI3LjkgMCAwIDAgOS41OSA4YTI3LjkgMjcuOSAwIDAgMC01LjE3LTRMNCAzLjc3VjE4YTEyIDEyIDAgMCAwIDkuOTMgMTEuODJoLjE0YTExLjcyIDExLjcyIDAgMCAwIDMuODYgMGguMTRBMTIgMTIgMCAwIDAgMjggMThWMy43N3pNOCAxOHYtNS44NWEyMy44NiAyMy44NiAwIDAgMSA1Ljg5IDEzLjU3QTggOCAwIDAgMSA4IDE4em04LTE2YTMgMyAwIDEgMCAzIDMgMyAzIDAgMCAwLTMtM3oiLz48L3N2Zz4=") !important;
}
6 changes: 3 additions & 3 deletions assets/js/admin/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1826,9 +1826,9 @@
return each_value !== choice_value;
})
) {
general_setting_data["options"] =
option_values.push(choice_value);
general_setting_data["options"] = option_values;
general_setting_data["options"] =
option_values.push(choice_value);
general_setting_data["options"] = option_values;
}
} else {
if ("default_value" === $(this).attr("data-field")) {
Expand Down
5 changes: 3 additions & 2 deletions assets/js/admin/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@
});
}

$(document).find(".wp-list-table").wrap("<div class='ur-list-table-wrapper'></div>");

$(document)
.find(".wp-list-table")
.wrap("<div class='ur-list-table-wrapper'></div>");
})(jQuery);
12 changes: 9 additions & 3 deletions assets/js/frontend/user-registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,12 @@
JSON.stringify(
checked_value
);
if ( "separate_shipping" === field.attr("data-id") ) {
formwise_data.value = field.val();
if (
"separate_shipping" ===
field.attr("data-id")
) {
formwise_data.value =
field.val();
}
} else {
formwise_data.value = "";
Expand Down Expand Up @@ -2540,14 +2544,16 @@

$('input[type="checkbox"]#checkall').on("click", function () {
var checkAll = $(this).attr("data-check");
$('[data-id = "' + checkAll + '" ]').prop(
$('[data-id = "' + checkAll + '[]" ]').prop(
"checked",
$(this).prop("checked")
);
});

$(".input-checkbox").on("change", function () {
var checkAll = $(this).attr("data-id");
checkAll = checkAll.replace("[]", "");

if ($(this).prop("checked") === false) {
$('[data-check = "' + checkAll + '" ]').prop("checked", false);
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/user-registration.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions includes/RestApi/controllers/version1/class-ur-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public static function ur_get_modules() {
}
$feature->link = $feature->link . '&utm_campaign=' . UR()->utm_campaign;
$feature->type = 'feature';
$feature->required_plan = __( 'Personal', 'user-registration' );
$features_lists[ $key ] = $feature;
}

Expand Down
2 changes: 0 additions & 2 deletions includes/admin/class-ur-admin-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public static function output() {
update_option( 'user_registration_first_time_activation_flag', false );
update_option( 'user_registration_onboarding_skipped', true );

error_log( print_r( $_REQUEST, true ) );

if ( isset( $_REQUEST['activeStep'] ) ) {
update_option( 'user_registration_onboarding_skipped_step', sanitize_text_field( wp_unslash( $_REQUEST['activeStep'] ) ) );
} else {
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/class-ur-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static function setup_wizard_body() {
</div>

<div class="user-registration-skip-btn">
<a href="<?php echo esc_url_raw( admin_url() . 'admin.php?page=user-registration-dashboard&end-setup-wizard=' . true . '&activeStep=install_page' ); ?>">
<a href="<?php echo esc_url_raw( admin_url() . 'admin.php?page=user-registration-dashboard&end-setup-wizard=' . true . '&activeStep=install_pages' ); ?>">
<p style="color: gray; font-style:italic;"><?php esc_html_e( 'Skip to Dashboard', 'user-registration' ); ?> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z"/>
</svg></p>
Expand Down
40 changes: 29 additions & 11 deletions includes/admin/notifications/class-ur-admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,22 @@ public static function init() {
*/
public static function user_registration_install_pages_notice() {

if ( get_option( 'user_registration_onboarding_skipped', false ) ) {
self::add_notice( 'continue_setup_wizard' );
}

if ( isset( $_POST['user_registration_myaccount_page_id'] ) ) { //phpcs:ignore.
$my_account_page = $_POST['user_registration_myaccount_page_id']; //phpcs:ignore.
} else {
$my_account_page = get_option( 'user_registration_myaccount_page_id', 0 );
}

if ( ! $my_account_page ) {
self::add_notice( 'install' );
if ( get_option( 'user_registration_onboarding_skipped', false ) ) {
self::add_notice( 'continue_setup_wizard' );
} elseif ( ! $my_account_page && ! get_option( 'user_registration_first_time_activation_flag', false ) ) {
if ( get_option( 'user_registration_install_pages_notice_removed', false ) ) {
self::remove_notice( 'install' );
} else {
self::add_notice( 'install' );
}
} else {
self::remove_notice( 'install' );
}

$matched = 0;
Expand Down Expand Up @@ -674,8 +678,13 @@ public static function hide_notices() {
self::remove_notice( $hide_notice );

// Remove the onboarding skipped checker if install notice is removed.
if ( 'install' === $hide_notice ) {
if ( 'continue_setup_wizard' === $hide_notice ) {
delete_option( 'user_registration_onboarding_skipped' );
delete_option( 'user_registration_onboarding_skipped_step' );
}

if ( 'install' === $hide_notice ) {
update_option( 'user_registration_install_pages_notice_removed', true );
}

/**
Expand Down Expand Up @@ -854,13 +863,22 @@ public static function continue_setup_wizard_notice() {
$onboarding_completed = true;

if ( ! $first_time_activation ) {
$onboard_skipped = get_option( 'user_registration_onboarding_skipped', false );
$onboard_skipped_step = get_option( 'user_registration_onboarding_skipped_step', false );
$onboard_skipped = get_option( 'user_registration_onboarding_skipped', false );
$onboard_skipped_step = get_option( 'user_registration_onboarding_skipped_step', false );
$registration_form_page_id = get_option( 'user_registration_registration_page_id', false );
$my_account_page_id = get_option( 'user_registration_myaccount_page_id', false );
$install_pages_done = ( $registration_form_page_id || $my_account_page_id ) ? true : false;
$onboard_skipped_step = 'install_page' === $onboard_skipped_step ? 'install_pages' : $onboard_skipped_step;

if ( ( 'install_pages' === $onboard_skipped_step ) && $install_pages_done ) {
$onboard_skipped_step .= '&installed';
}

if ( $onboard_skipped && $onboard_skipped_step ) {
/* translators: % s: continue wizard URL */
$onboarding_complete_text = sprintf( __( '<a href="%s" class="button-primary">Continue Setup Wizard</a>', 'user-registration' ), esc_url( admin_url( '/admin.php?page=user-registration-welcome&tab=setup-wizard&step=' . $onboard_skipped_step . '' ) ) );
$onboarding_completed = false;
$onboarding_complete_text = sprintf( __( '<a href="%s" class="button-primary" style="margin-right: 5px;">Continue Setup Wizard</a>', 'user-registration' ), esc_url( admin_url( '/admin.php?page=user-registration-welcome&tab=setup-wizard&step=' . $onboard_skipped_step . '' ) ) );
$onboarding_complete_text .= sprintf( __( '<a class="button-secondary skip" href="%s">Skip setup</a>', 'user-registration' ), esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'continue_setup_wizard' ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ) );
$onboarding_completed = false;
} else {
$onboarding_completed = true;
}
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions includes/blocks/block-types/class-ur-block-myaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ protected function build_html( $content ) {
$parameters['userState'] = $attr['userState'];
}

if ( (empty( $parameters ) || ( isset($parameters['userState']) && "logged_in" === $parameters['userState'] ) ) || (!empty($parameters) && !isset($parameters['userState'])) ) {
if ( ( empty( $parameters ) || ( isset( $parameters['userState'] ) && 'logged_in' === $parameters['userState'] ) ) || ( ! empty( $parameters ) && ! isset( $parameters['userState'] ) ) ) {
return UR_Shortcodes::my_account(
$parameters
);
} else if(isset($parameters['userState']) && "logged_out" === $parameters['userState']) {
} elseif ( isset( $parameters['userState'] ) && 'logged_out' === $parameters['userState'] ) {
return UR_Shortcodes::login(
$parameters
);
Expand Down
16 changes: 12 additions & 4 deletions includes/class-ur-form-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static function init() {
* Remove key and login from querystring, set cookie, and redirect to account page to show the form.
*/
public static function redirect_reset_password_link() {
global $wp;
if ( ( isset( $wp->query_vars['ur-lost-password'] ) && empty( $wp->query_vars['ur-lost-password'] ) ) || ! isset( $wp->query_vars['ur-lost-password'] ) ) {
return;
}
$page_id = ur_get_page_id( 'myaccount' );
$is_ur_login_or_account_page = ur_find_my_account_in_page( $page_id );

Expand Down Expand Up @@ -640,16 +644,20 @@ public static function process_reset_password() {

if ( $user instanceof WP_User ) {
if ( empty( $posted_fields['password_1'] ) ) {
ur_add_notice( esc_html__( 'Please enter your password.', 'user-registration' ), 'error' );
$err_msg = apply_filters( 'user_registration_reset_password_error_message', __( 'Please enter your password.', 'user-registration' ) );
ur_add_notice( $err_msg, 'error' );
}

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

if ( wp_check_password( $posted_fields['password_1'], $user->user_pass, $user->ID ) ) {
ur_add_notice( esc_html__( 'New password must not be same as old password.', 'user-registration' ), 'error' );
$err_msg = apply_filters( 'user_registration_reset_password_error_message', __( 'New password must not be same as old password.', 'user-registration' ) );
ur_add_notice( $err_msg, 'error' );
}

$errors = new WP_Error();
/**
* Fires an action hook to validate a password reset attempt.
Expand Down Expand Up @@ -683,7 +691,7 @@ public static function process_reset_password() {

$redirect = add_query_arg( 'password-reset', 'true', $ur_login_or_account_page );
$redirect = apply_filters( 'user_registration_reset_password_redirect', $redirect, $user );

wp_redirect( $redirect );
exit;
}
Expand Down
Loading

0 comments on commit 0f0fb88

Please sign in to comment.