From 4c927e36bf5e0e0cdd5734eb3229b675e2fff521 Mon Sep 17 00:00:00 2001 From: Denis Baranov Date: Fri, 8 Dec 2017 12:53:50 +0200 Subject: [PATCH] - fixed UM20 ajax not working when "Site Address URL" different to "WordPress Address URL" --- includes/class-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-functions.php b/includes/class-functions.php index 77a58143..f2473076 100644 --- a/includes/class-functions.php +++ b/includes/class-functions.php @@ -68,7 +68,7 @@ if ( ! class_exists( 'UM_Functions' ) ) { 'um_verify' => $nonce ), get_admin_url( null, 'admin-ajax.php' ) ); } else if ( get_option( 'permalink_structure' ) ) { - $url = get_site_url( null, 'um-api/route/' . $route . '/' . $method . '/' . $nonce ); + $url = get_home_url( null, 'um-api/route/' . $route . '/' . $method . '/' . $nonce ); } else { $url = add_query_arg( array( 'um_page' => 'api', @@ -76,7 +76,7 @@ if ( ! class_exists( 'UM_Functions' ) ) { 'um_resource' => $route, 'um_method' => $method, 'um_verify' => $nonce - ), get_site_url() ); + ), get_home_url() ); } return $url; }