I am building a Members only WordPress site using Astra Theme with WooCommerce, WooCommerce Cart Abandonment Recovery, Beaver Builder Plugin (Lite Version), Ultimate Addons for Beaver Builder – Lite, Carousel Slider, My Custom Functions, New User Approve, Peter’s Login Redirect, Redirection, Shortcode in Menus, Starter Templates, Theme My Login, Tuxedo Big File Uploads and WP-MLM as active Plugins.
It works 100% the way I wanted it to work on my localhost, but when I go live on the server everything works except the Redirections if I activate the WP-MLM Plugin. When the WP-MLM Plugin is activated I cannot Logout. If I attempt to Logout I get a blank screen. If I refresh I get a message "You are attempting to log out of MySite" "Do you really want to log out?" although I have deactivated this in functions.php with this code:
function wp_nonce_ays( $ action ) { if ( ‘log-out’ === $ action ) { $ html = sprintf( /* translators: %s: Site title. / __( ‘You are attempting to log out of %s’ ), get_bloginfo( ‘name’ ) ); $ html .= ‘
‘; $ redirect_to = isset( $ _REQUEST[‘redirect_to’] ) ? $ _REQUEST[‘redirect_to’] : ”; $ html .= sprintf( / translators: %s: Logout URL. */ __( ‘Do you really want to log out?’ ), wp_logout_url( $ redirect_to ) ); } else { $ html = __( ‘The link you followed has expired.’ ); if ( wp_get_referer() ) { $ html .= ‘
‘; $ html .= sprintf( ‘%s’, esc_url( remove_query_arg( ‘updated’, wp_get_referer() ) ), __( ‘Please try again.’ ) ); } }
wp_die( $ html, __( 'Something went wrong.' ), 403 );
}
I hope someone can give me some insight on what I am doing wrong? All successful logout’s must be redirected to the login page as was set up in Peter’s Login Redirect Plugin.