wc_logout_url() problem
-
I want the user to return to the current page after logout.
According to the documentation, I created the following code:
$current_url = esc_url( home_url( $_SERVER['REQUEST_URI'] ) );
<a href="<?php echo esc_url( wc_logout_url( $current_url ) ); ?>">logout</a>And this code created a link like this:
https://site.com/product/hi/customer-logout/?_wpnonce=03350da55bBut by clicking on it, the user is not logged out of the site and goes to the 404 page!
I think this function has a bug.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘wc_logout_url() problem’ is closed to new replies.