1. Casa
  2. Knowledge Base
  3. Modulo d'ordine all'ingrosso WooCommerce
  4. Reindirizza l'URL di accesso di un modulo d'ordine con accesso negato in una pagina specifica del modulo d'ordine all'ingrosso

Reindirizza l'URL di accesso di un modulo d'ordine con accesso negato in una pagina specifica del modulo d'ordine all'ingrosso

Our Order Form plugin offers the option to create multiple forms. You can set permissions on each form and customize the Access Denied text. If you have the Lead Capture plugin, you may customize the login redirection page.



However, if you have multiple Order Forms, the login page will always redirect to the page where wholesale customers are redirected immediately after logging in, set under the Lead Capture plugin. To override this, you may use this snippet. Add it under your child’s theme functions.php or via the WP Code plugin.

add_filter('option_wwof_permissions_noaccess_login_url', function ($url) {
    global $wp_query;
    
    // Get the current page ID
    $page_id = $wp_query->post->ID;
    
    // Update the page ID (123) and the redirect URL accordingly
    if ($page_id == '123') {
        return 'https://www.google.com/'; // Change this to the correct URL
    }
    
    // Update the page ID (124) and the redirect URL accordingly
    if ($page_id == '124') {
        return 'https://www.youtube.com/'; // Change this to the correct URL
    }
    
    return $url;
});

Questo articolo è stato utile?

Articoli Correlati

Serve Supporto?

Non trovi la risposta che cerchi?
Contatta il Supporto
Completa il tuo acquisto