Home Forums Themes Support Claue Bypass logout confirmation

Viewing 1 reply thread
  • Author
    Posts
    • #13583

      Hi,

      Is there are way to bypass logout confirmation? I’m using this snippet code->

      add_action('check_admin_referer', 'logout_without_confirm', 10, 2);
      function logout_without_confirm($action, $result)
      {
      /**
      * Allow logout without confirmation
      */
      if ($action == "log-out" && !isset($_GET['_wpnonce'])) {
      $redirect_to = isset($_REQUEST['redirect_to']) ?
      $_REQUEST['redirect_to'] : '';
      $location = str_replace('&', '&', wp_logout_url($redirect_to));;
      header("Location: $location");
      die();
      }
      }

      Thanks

    • #13593

      Hi,

      You can follow these articles https://gist.github.com/lukecav/451275daa51f4fcaf2cbe1eadfa15fe4 or https://iconicwp.com/blog/bypass-are-you-sure-you-want-to-log-out-message-in-woocommerce/ and add the code to functions.php in claue-child.

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 1 reply thread

You must be logged in to reply to this topic.