Support

Home Forums Event Espresso Premium espresso_create_wp_user for ee4

espresso_create_wp_user for ee4

Posted: November 18, 2014 at 12:29 am

Viewing 6 reply threads


Liam Crank

November 18, 2014 at 12:29 am

espresso_create_wp_user

action_hook_espresso_save_attendee_data is not working for EE4, can you guide me which hook will be used for save wp user creation.


Dean

November 18, 2014 at 2:55 am

Hi,

That action hook does not exist in EE4.

AHEE__EE_Single_Page_Checkout__process_attendee_information__end might be a better choice, though it might be a little early for you (it fires when the person fills out the form and clicks the proceed to payment options button).

The code is found in
event-espresso-core-reg_445\modules\single_page_checkout\EED_Single_Page_Checkout.module.php

and has two variables,

do_action( ‘AHEE__EE_Single_Page_Checkout__process_attendee_information__end’, $this, $valid_data );


Liam Crank

November 19, 2014 at 12:39 am

Thanks for the help, its working.


Liam Crank

November 19, 2014 at 2:17 am

One More thing i want to ask you is that, I want to add one option while creating an event beneath the “event registration option”, actually I want to add a check box option and check box value will be saved in database, can you guide me the best option ,that how can i easily perform this job.


Dean

November 19, 2014 at 4:50 am

Hi,

Well you could create a Post Meta Box and have the data save to the post meta –

http://codex.wordpress.org/Function_Reference/add_meta_box
http://www.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/

Event Espresso’s event post type is called espresso_events


Liam Crank

November 20, 2014 at 2:06 am

Great,Its working.
one question please.
How can i get Event id on( when the person fills out the form and clicks the proceed to payment options button). Actually I want to set a condition based on event ID.


Dean

November 20, 2014 at 4:57 am

This took a while to figure out, and much gratitude should go to my colleague Tony for this.

add_action('AHEE__registration_page_attendee_information__start', 'dxxx', 10, 1 );

function dxxx($event_queue) {
//var_dump($event_queue);
$my_registrations = $event_queue['items']; 
foreach($my_registrations as $a_reg) { echo $a_reg[event] -> ID(); }
}

That obviously just echoes it all out so you need to modify it and that data should be available throughout the checkout process.

Viewing 6 reply threads

The support post ‘espresso_create_wp_user for ee4’ 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