Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Custom Field Variables: Post ID vs Event ID | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Custom Field Variables: Post ID vs Event ID

Custom Field Variables: Post ID vs Event ID

Posted: September 13, 2012 at 2:49 am

Viewing 2 reply threads


mblatch

September 13, 2012 at 2:49 am

I’m hooking in to action_hook_espresso_display_offsite_payment_gateway in gateway_display.php and I need to fetch the event start date.

I’m looking at http://staging.eventespresso.com/wiki/shortcodes-template-variables/ where it states to use $event_start_date = get_post_meta($post->ID, 'event_start_date', true);

However as I’m on a WP page (EE payment page) I don’t think the $post value is pointing to the correct event. I have the event_id var available, is there an event_id-to-post_id function?

Thanks!


Dean

  • Support Staff

September 13, 2012 at 3:14 am

Hi,

No I dont believe you can find out the Post ID via the Event info, though you can do it the reverse way as the Post meta holds the Event ID.

If you are on a page (rather than the event post) you would need to supply the appropriate post id to the function in order to get the meta info, as just running get_post_meta without a specific ID will make WP try and find the meta info for that page.


mblatch

September 14, 2012 at 2:23 am

Thanks a lot for your help! That’s a shame, maybe something to add to the API? As I can’t see how to access the event date from the payment page…

Viewing 2 reply threads

The support post ‘Custom Field Variables: Post ID vs Event ID’ 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 - Staging Server