Changeset 2931939
- Timestamp:
- 06/28/2023 04:36:17 PM (3 years ago)
- Location:
- woo-wp-login
- Files:
-
- 1 added
- 2 edited
- 2 copied
-
tags/3.0.1 (added)
-
tags/3.0.1/readme.txt (copied) (copied from woo-wp-login/trunk/readme.txt) (1 diff)
-
tags/3.0.1/woocommerce-wp-login.php (copied) (copied from woo-wp-login/trunk/woocommerce-wp-login.php) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/woocommerce-wp-login.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-wp-login/tags/3.0.1/readme.txt
r2931619 r2931939 51 51 52 52 == Changelog = 53 = 3.0.1 = 54 - Fixed issue with old (non-Javascript) method caused by merge, and removed unnecessary redirect code which could potentially result in redirect loop. 55 53 56 = 3.0.0 = 54 57 - Merged free and premium plugin versions. Now providing all premium features free of charge. -
woo-wp-login/tags/3.0.1/woocommerce-wp-login.php
r2931626 r2931939 5 5 Description: Redirects wp-login.php page to default WooCommerce "My account" page, IF WooCommerce is installed AND active. 6 6 Text Domain: woo-wp-login 7 Version: 3.0. 07 Version: 3.0.1 8 8 Author: Machine Pro SEO <[email protected]> 9 9 Author URI: https://www.machineproseo.com … … 38 38 echo '<input type="hidden" name="redirect-to" value="' . esc_url(add_query_arg(array_map('urlencode', $_GET), $redirect_to)) . '">'; 39 39 } 40 foreach ($_POST as $key => $value) { 41 if ('redirect-to' !== $key) { 42 echo '<input type="hidden" name="' . esc_attr($key) . '" value="' . esc_attr($value) . '">'; 40 if (!empty($_POST)) { 41 foreach ($_POST as $key => $value) { 42 if ('redirect-to' !== $key || empty($redirect_to)) { 43 echo '<input type="hidden" name="' . esc_attr($key) . '" value="' . esc_attr($value) . '">'; 44 } 43 45 } 44 46 } … … 47 49 } 48 50 if (!isset($_GET['action']) || 'logout' !== $_GET['action']) { 49 $redirect_url = add_query_arg(array('redirect-to' ,( !empty($redirect_to) ? $redirect_to : false )), $redirect_url);51 $redirect_url = add_query_arg(array('redirect-to' => ( !empty($redirect_to) ? $redirect_to : false )), $redirect_url); 50 52 header('refresh:0.1;url=' . esc_url($redirect_url)); 51 53 exit(); … … 83 85 } 84 86 } 85 if (wp_safe_redirect(esc_url_raw(add_query_arg(array_merge(array_map('urlencode', array_filter(array_merge($_GET, array('re auth' => false, 'redirect-to' => false, 'redirect_to' => false)))), array('redirect-to' => false, 'redirect_to' => false, 'reauth' => false)), $myaccount_redirect)))) {87 if (wp_safe_redirect(esc_url_raw(add_query_arg(array_merge(array_map('urlencode', array_filter(array_merge($_GET, array('redirect-to' => false, 'redirect_to' => false, 'reauth' => false)))), array('redirect-to' => false, 'redirect_to' => false, 'reauth' => false)), $myaccount_redirect)))) { 86 88 exit(); 87 89 } … … 118 120 } 119 121 } 120 if (!empty($_GET['redirect-to']) || !empty($_GET['redirect_to'])) {121 if (is_user_logged_in() && (!isset($_GET['action']) || !in_array($_GET['action'], $action_array))) {122 $user = wp_get_current_user();123 if ($user && property_exists($user, 'user_login')) {124 woo_wp_login($user->user_login, $user);125 }126 } else {127 $redirect_to = ( !empty($_GET['redirect-to']) ? sanitize_text_field($_GET['redirect-to']) : ( !empty($_GET['redirect_to']) ? sanitize_text_field($_GET['redirect_to']) : '' ) );128 $redirect_url = add_query_arg(array_map('urlencode', array_filter(array_merge($_GET, array('redirect-to' => false, 'redirect_to' => false)))), $myaccount);129 woo_wp_login_redirect($redirect_url, $pagenow, $redirect_to);130 }131 }132 122 } 133 123 }); -
woo-wp-login/trunk/readme.txt
r2931619 r2931939 51 51 52 52 == Changelog = 53 = 3.0.1 = 54 - Fixed issue with old (non-Javascript) method caused by merge, and removed unnecessary redirect code which could potentially result in redirect loop. 55 53 56 = 3.0.0 = 54 57 - Merged free and premium plugin versions. Now providing all premium features free of charge. -
woo-wp-login/trunk/woocommerce-wp-login.php
r2931626 r2931939 5 5 Description: Redirects wp-login.php page to default WooCommerce "My account" page, IF WooCommerce is installed AND active. 6 6 Text Domain: woo-wp-login 7 Version: 3.0. 07 Version: 3.0.1 8 8 Author: Machine Pro SEO <[email protected]> 9 9 Author URI: https://www.machineproseo.com … … 38 38 echo '<input type="hidden" name="redirect-to" value="' . esc_url(add_query_arg(array_map('urlencode', $_GET), $redirect_to)) . '">'; 39 39 } 40 foreach ($_POST as $key => $value) { 41 if ('redirect-to' !== $key) { 42 echo '<input type="hidden" name="' . esc_attr($key) . '" value="' . esc_attr($value) . '">'; 40 if (!empty($_POST)) { 41 foreach ($_POST as $key => $value) { 42 if ('redirect-to' !== $key || empty($redirect_to)) { 43 echo '<input type="hidden" name="' . esc_attr($key) . '" value="' . esc_attr($value) . '">'; 44 } 43 45 } 44 46 } … … 47 49 } 48 50 if (!isset($_GET['action']) || 'logout' !== $_GET['action']) { 49 $redirect_url = add_query_arg(array('redirect-to' ,( !empty($redirect_to) ? $redirect_to : false )), $redirect_url);51 $redirect_url = add_query_arg(array('redirect-to' => ( !empty($redirect_to) ? $redirect_to : false )), $redirect_url); 50 52 header('refresh:0.1;url=' . esc_url($redirect_url)); 51 53 exit(); … … 83 85 } 84 86 } 85 if (wp_safe_redirect(esc_url_raw(add_query_arg(array_merge(array_map('urlencode', array_filter(array_merge($_GET, array('re auth' => false, 'redirect-to' => false, 'redirect_to' => false)))), array('redirect-to' => false, 'redirect_to' => false, 'reauth' => false)), $myaccount_redirect)))) {87 if (wp_safe_redirect(esc_url_raw(add_query_arg(array_merge(array_map('urlencode', array_filter(array_merge($_GET, array('redirect-to' => false, 'redirect_to' => false, 'reauth' => false)))), array('redirect-to' => false, 'redirect_to' => false, 'reauth' => false)), $myaccount_redirect)))) { 86 88 exit(); 87 89 } … … 118 120 } 119 121 } 120 if (!empty($_GET['redirect-to']) || !empty($_GET['redirect_to'])) {121 if (is_user_logged_in() && (!isset($_GET['action']) || !in_array($_GET['action'], $action_array))) {122 $user = wp_get_current_user();123 if ($user && property_exists($user, 'user_login')) {124 woo_wp_login($user->user_login, $user);125 }126 } else {127 $redirect_to = ( !empty($_GET['redirect-to']) ? sanitize_text_field($_GET['redirect-to']) : ( !empty($_GET['redirect_to']) ? sanitize_text_field($_GET['redirect_to']) : '' ) );128 $redirect_url = add_query_arg(array_map('urlencode', array_filter(array_merge($_GET, array('redirect-to' => false, 'redirect_to' => false)))), $myaccount);129 woo_wp_login_redirect($redirect_url, $pagenow, $redirect_to);130 }131 }132 122 } 133 123 });
Note: See TracChangeset
for help on using the changeset viewer.