• Resolved tobbecokta

    (@tobbecokta)


    Hi,

    Is it possible to achieve the following:

    The “Standard kundtyp” for logged out customers is always: Privatperson
    The “Standard kundtyp” for logged in customers is always: F?retag

    https://nimb.ws/xtiMFJ

    You see my logged in customers are always companies, while most of the logged out customers are individuals. Is this possible to achieve in any way>?

Viewing 1 replies (of 1 total)
  • Plugin Author The Generation

    (@thegeneration)

    Hi!

    This isn’t anything we’ve tried. But maybe you could use the woocommerce_sco_settings_default_customer_type filter?

    Something like this:

    add_filter( 'woocommerce_sco_settings_default_customer_type', 'svea_set_default_customer_type', 10, 1 );
    
    function svea_set_default_customer_type( $customer_type ) {
        return is_user_logged_in() ? 'company' : 'individual';
    }

    Best regards

    • This reply was modified 4 years, 6 months ago by The Generation. Reason: Code formatting
Viewing 1 replies (of 1 total)
  • The topic ‘Standard customer type depending on login status’ is closed to new replies.