• Resolved smeleka

    (@smeleka)


    Amazing plugin, thank you.

    My client is an ADHD coach and I’ve set up a Gravity Forms/Simply Schedule Appointments booking system so her clients can book and pay for sessions. At the moment they have to pay up-front via Stripe to save their booking.

    This all works great, but my client also wants to be able to book on their behalf without payment. So what I need to do is conditionally show or hide the payment form element if the current user is an admin who is impersonating a client.

    I couldn’t find an obvious way to do this in the docs or the support forum, but I guess there has to be a state being stored somewhere so that admins can switch back to their accounts.

    Any ideas how I could tackle this?

    Thanks again,
    Steve

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter smeleka

    (@smeleka)

    With the help of a custom GPT trained on the plugin files, I’ve found an – imperfect – solution.

    The GPT-generated code uses PHP’s ReflectionClass to access the private VAA_View_Admin_As property as a workaround.

    Would it be possible for you to look into providing a proper public method to access the impersonated user?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @smeleka

    The impersonated user is actually the current user when you’ve switched to a user view.
    While this plugins does support user switching this feature is not the same as impersonating a user for ordering.

    I also consider this out-of-scope because such a feature it’s not actually switching, it’s placing an order for another user.
    Even with custom modifications from GPT I’m unsude whether you could use my plugin for such a feature since it’s functionality at it’s core is simply very different.

    Ofcourse I could create an addon or something and I would consider this provided that such an addon doesn’t exist already.

    I’m on holiday right now so can’t respond quickly unfortunately. Thank you for understanding.

    Cheers, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @smeleka

    Just a heads-up that I’m closing this topic since it’s become stale.
    Feel free to contact me on any further questions!

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.