diff --git a/core/um-actions-misc.php b/core/um-actions-misc.php
index 0345cc66..4dda7f90 100644
--- a/core/um-actions-misc.php
+++ b/core/um-actions-misc.php
@@ -4,10 +4,12 @@
*** @add a force redirect to from $_get
***/
add_action('um_after_form_fields', 'um_browser_url_redirect_to');
- function um_browser_url_redirect_to($args) {
+ function um_browser_url_redirect_to( $args ) {
global $ultimatemember;
+ $url = '';
+
if ( isset( $_REQUEST['redirect_to'] ) && !empty( $_REQUEST['redirect_to'] ) ) {
$url = $_REQUEST['redirect_to'];
echo '';
@@ -32,17 +34,16 @@
$url = $ultimatemember->permalinks->get_current_url();
- if ( defined('DOING_AJAX') && DOING_AJAX ) {
- $url = apply_filters('um_browser_url_redirect_to__filter', $url );
- }
-
break;
}
+ }
+
+ $url = apply_filters('um_browser_url_redirect_to__filter', $url );
+ if( ! empty( $url ) ){
echo '';
-
}
}