Support

Home Forums Event Espresso Premium equivalencies/mapping from EE3 to EE4?

equivalencies/mapping from EE3 to EE4?

Posted: October 23, 2018 at 3:06 am

Viewing 3 reply threads


lhammond

October 23, 2018 at 3:06 am

We have customized a bunch of things in our EE3 implementation, and are now ready to upgrade to EE4. I am wondering if there is a table for developers that would help map old field names and the variables used to access them to the new ones in EE4? Specifically, some of the things I need to do are:

1) customize the table view add on template, to show separate columns for start date, start time, end time, day of week (which we store in event_meta), instructor (also stored in event_meta), grade range (also event_meta), open spots, and the ability to add the class or waitlist to the cart without leaving the page, so that we can keep the functionality we had before using custom templates.
a) how is the event_meta data mapped into the new structure?
b) is there a way to show all categories *except* one?
c) if there is only one ticket type per class, is there a simpler way to retrieve event time and price data other than looping through ticket options?

2) Integrate the custom fields we added to the previous Members Add-on, which we stored in wp_usermeta, and which are then used to prepopulate EE form fields when members register for classes. What is the best way to customize the WP User Integration Add-on to retrieve our functionality?
a) are there any front-end templates already written to edit the WP User data?
b) When the EE3 data was converted to EE4 data, were the links between wp_users and attendee registrations maintained? If not, how can we re-link them?

Thanks.


Josh

  • Support Staff

October 23, 2018 at 8:33 am

Hi,

I’ll try to avoid conflating the following information by creating a separate reply for each topic you’ve asked about here.

First, the specifics of the database migration from EE3 to EE4 are outlined in the source files:
https://github.com/eventespresso/event-espresso-core/tree/master/core/data_migration_scripts/4_1_0_stages

For example, any event_meta fields from EE3 are converted to native WordPress post_meta:

https://github.com/eventespresso/event-espresso-core/blob/master/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_events.dmsstage.php#L255

General information:

Since EE4 events & venues are custom post types and most of the templates are WordPress loops, you’ll be able to use the native WordPress functions like
https://developer.wordpress.org/reference/functions/get_post_meta/
and
https://developer.wordpress.org/reference/functions/the_post_thumbnail/
when you customize templates.


Josh

  • Support Staff

October 23, 2018 at 8:55 am

1) customize the table view add on template, to show separate columns for start date, start time, end time, day of week (which we store in event_meta), instructor (also stored in event_meta), grade range (also event_meta), open spots,

You’ll find general information about making customizations to the table template here:
https://eventespresso.com/wiki/events-table-view-template-add-on/#customizations

and the ability to add the class or waitlist to the cart without leaving the page, so that we can keep the functionality we had before using custom templates.

The only way to replicate that using EE4 would be to include the ticket selector within a column of the table. Here’s an example from a GitHub gist:
https://gist.github.com/joshfeck/e8fcb3946f56490d1384bfcc449caa9b#file-espresso-events-table-template-template-php-L119

a) how is the event_meta data mapped into the new structure?

event_meta in EE4 is stored in post_meta, so you can use native WP functions to get that data.

b) is there a way to show all categories *except* one?

Yes, you can add a custom function to your site to exclude a specific category on a specific page. Here’s a link to some example code:
https://gist.github.com/joshfeck/b293aeae61bd3f13dd21#file-functions-php

c) if there is only one ticket type per class, is there a simpler way to retrieve event time and price data other than looping through ticket options?

You can follow the example of the table template itself in how it handles events with multiple dates when the show_all_datetimes parameter is false. It simply uses PHP’s reset() function to grab & display the first upcoming datetime only.
https://github.com/eventespresso/eea-events-table-template/blob/master/templates/espresso-events-table-template.template.php#L109


Josh

  • Support Staff

October 23, 2018 at 9:41 am

2) Integrate the custom fields we added to the previous Members Add-on, which we stored in wp_usermeta, and which are then used to prepopulate EE form fields when members register for classes. What is the best way to customize the WP User Integration Add-on to retrieve our functionality?

We recommend adding the customization code to its own plugin. Within the plugin you can add callback functions that hook in to Event Espresso 4 core by means of filter hooks and/or action hooks. There’s a filter hook in EE4 core that allows for pre-populating the EE form with custom data:
FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__input_constructor_args
You, and the developer working with your team, can find that hook by doing a project search in your IDE, or view its parameters in context here:
https://github.com/eventespresso/event-espresso-core/blob/master/core/db_classes/EE_Question.class.php#L544

a) are there any front-end templates already written to edit the WP User data?

This is outside the scope of Event Espresso and the WP User Integration’s feature set. I can point you in the direction of looking into plugins that may provide front-end editing of user data:

https://wordpress.org/search/edit+front+end+user+profile+data+plugin

b) When the EE3 data was converted to EE4 data, were the links between wp_users and attendee registrations maintained? If not, how can we re-link them?

They’re not. You can re-link them by following this guide:
https://gist.github.com/joshfeck/2165ff295c968f861cef8775fc8b1dc9

Viewing 3 reply threads

The support post ‘equivalencies/mapping from EE3 to 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