• Resolved digo

    (@digo)


    Hi!

    Is it possible to hide step billing form, if user already has an account and is logged in?

    Thanks
    Digo

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    Hello Digo,

    you can hide the billing step from the logged-in users by adding the following PHP snippet to your child theme’s functions.php file:

    if ( ! function_exists( 'wmsc_delete_billing_step' ) ) {
        function wmsc_delete_billing_step( $steps ) {
            if ( is_user_logged_in() ) {
                unset( $steps['billing'] );
            }
            return $steps;
        }
    }

    If you don’t feel comfortable to modify the child theme’s functions.php file, then using a plugin similar to Code Snippets will give you the same results.

    Thread Starter digo

    (@digo)

    Hello Diana,

    thanks for your reply.

    I added code (I am using my own plugin), but nothing happens – billing step is still there.

    There is no call to a function wmsc_delete_billing_step in the plugin.
    Do we need a add_action call, too?

    Thanks
    Digo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide step: billing form when user logged in’ is closed to new replies.