Support

Home Forums Event Espresso Premium Change registration status if not a registered user

Change registration status if not a registered user

Posted: December 19, 2017 at 2:51 pm


gharris@ibiweb.org

December 19, 2017 at 2:51 pm

I am trying to find out if the status of a registration can be changed to “Not Approved” if the user is not registered, but stay the default “Pending” for registered members.

We are using add-on WP User Integration to handle membership options but need one step further. Here is the scenario:
A non-member wants to register for event
Status of registration is set to Not Approved
Admin reviews and changes status to Pending
Invoice is then sent for payment

I found this
https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/tw_ee_set_default_payment_reg_status_change.php

$(“.txn-reg-status-change-reg-status”).val(“NAN”);

I am thinking the logic would be:
if wp_user
check role/capabilities
if non-member set status to NOT APPROVED

Another question: Will this need to be triggered by registration form loading or onclick of “register for event”?

thank you for your help!


Tony

  • Support Staff

December 20, 2017 at 4:33 am

Hi there,

The function you linked to just sets the default value of the dropdown in the apply payment modal using some JavaScript, its this section – http://take.ms/ZQWAV

It doesn’t actually set the registration status, just sets the value used in the drop-down and then the update/payment function used when the payment is applied the registration is updated using that value.

This may not be possible with the current filters, or at least I can not find a filter that will allow you to do it, but I’ve requested some additional feedback from our developers to confirm.


gharris@ibiweb.org

January 2, 2018 at 10:55 am

Has there been any feedback from developers on this question? thank you.


Tony

  • Support Staff

January 4, 2018 at 6:19 am

Hi there,

I’ve spoken with one of our developers and discussed this but I don’t think it can work how you are expecting.

Can I ask, are you wanting the registration status to be set before the registration is paid for?

It appears so with the requirements above but then you could just use the EE4 User Integration add-on, set a minimum required capability on the ticket so that the users can’t register onto that ticket without the cap.


gharris@ibiweb.org

January 4, 2018 at 10:26 am

I think I over complicated the question… here is the simplified version:

All of the event registrations need to be set to Not Approved by default. (which I did in event settings)

If the user is an existing member (WP User) then the event registration status changes to Pending.

We are using the User Integration add on which requires existing users to login so I should be able to test if they are an existing user and if so, change the registration status. I assume this change has to happen prior to or upon the registration form being displayed.

If I were to create a function in my child theme, what would be the hook I use? And what is the field for registration status?

thank you!


Tony

  • Support Staff

January 4, 2018 at 11:04 am

I assume this change has to happen prior to or upon the registration form being displayed.

It’s after the registration form is displayed and done when processing the attendee info before the payment options step.

If you are already using the WP User Integration add-on you can just set the minimum required capability on the ticket (its not just about forcing users to log in, you can set specific capabilities on tickets) to prevent Non-members registering. You can then provide a non member and member ticket if needed.


gharris@ibiweb.org

January 4, 2018 at 11:15 am

We are going to be using the WP User Integration for the minimum capabilities once it is determined if the user is a member or not. There are members and non-members and tiered pricing within each. Members can register right away and see the ticket based on their role. Non-members have to be approved by staff manually before they can complete a registration. That is where the registration status comes in.


Tony

  • Support Staff

January 4, 2018 at 1:52 pm

We are going to be using the WP User Integration for the minimum capabilities once it is determined if the user is a member or not.

How are you going to do that?

The ticket won’t allow registrations unless they have the capability on their account, so your in a chicken and egg situation as far as I can tell.

You want to use the minimum required capability and allow everyone to register, but then use the value to stop the registration half way through and change the registration status? They can’t register onto the ticket without the cap, so I don’t understand how that would work.

I’m more than happy to work through this and if I’m misunderstanding then I apologise but right now I can’t see how you would do what you are trying to do with the capability, even if there was a hook to change the status.


gharris@ibiweb.org

January 4, 2018 at 4:08 pm

If the user is a member, then the status would change to Pending. Members have 2 tiers of pricing which coincide with member levels. Capabilities will be for member tickets only.

If the user is a non-member, the status would remain as Not Alllowed. Tiered pricing and capabilities would not apply to non-members.

Our client wants the ability to manually approve a registration if the user is not a member.


Tony

  • Support Staff

January 5, 2018 at 5:51 am

So are you trying to switch the registration status early enough for the members to continue through the registration without being ‘Not Approved’ at all?

I don’t think that’s possible currently but can check.

Can you provide a full break down of how the tickets will be created in EE and how you want registrations to work for both members and non-members? The above overview in the opening post is too general. I’ll then pass that on to the developers and see if it’s currently possible.


gharris@ibiweb.org

January 5, 2018 at 8:21 am

“So are you trying to switch the registration status early enough for the members to continue through the registration without being ‘Not Approved’ at all?”
Yes that is correct

Here is the breakdown:
Member Type 1 (price)
Member Type 2 (price +)

Non-Member Type 1 (price ++)
Non-Member Type 2 (price +++)

The problem the client has had in the past is that the non-member registrant will claim he is type 1 to get the discounted price when actually he is type 2. The client wants to check his credentials and verify he is type 1 before registration is complete.

We already know the type of a member (they are an existing user) so they are free to register.

I hope this clarifies things.


Tony

  • Support Staff

January 10, 2018 at 5:42 am

I did some digging into this and its not possible for EE to work how you are currently expecting without a lot of customizations to the checkout process.

The events default registration status (DRS for short) is used by the checkout to determine which display strategy to use throughout, so even if you manage to change the registration status on step one, the display strategy prevents the next step (payment options) from displaying and shows the Not Approved message.

Right now its possible to change the registration status after the checkout and payment has been made but also only after the messages have been triggered so the use would receive the Reg Approved messages, then the registration status would change to Not Approved, the admin could then check the registration and either approve them or move them onto the other ticket for them to pay the remainder.

I can request a hook is added to core so the status can be changed before the messages are triggered (and possible not trigger them at all) if the above will work for you.


gharris@ibiweb.org

January 10, 2018 at 8:13 am

OK – thank you for looking into this. Would it be possible to have a wait list on the ticket (not entire event). this way the non-member sends in contact info but not actually registered?


Tony

  • Support Staff

January 10, 2018 at 9:47 am

You can’t currently set a waitlist for specific tickets, just events.

One option is to split the non-member tickets out into a separate event used specifically for those non-members and then set that events DRS to ‘Not Approved’, then add a link in the original event those non-members can use to register onto that event.

Would that work?

The support post ‘Change registration status if not a registered user’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso