Support

Home Forums Event Espresso Premium ee_display_ticket_selector_once()

ee_display_ticket_selector_once()

Posted: June 21, 2017 at 3:21 pm

Viewing 6 reply threads


Marcia Chadly

June 21, 2017 at 3:21 pm

Last July I asked about using the ESPRESSO_TICKET_SELECTOR shortcode within the body of an event page without having ticket selector show up at the bottom also. You can see that topic here: https://eventespresso.com/topic/using-espresso_ticket_selector/

I did what was suggested and that worked until now. It now appears that ee_display_ticket_selector_once() is not being called. Perhaps due to recent updates? Is there a different way to use the ticket selector shortcode and avoid a duplicate ticket selector showing up?

In Connection,
Marcia


Josh

  • Support Staff

June 21, 2017 at 4:27 pm

Hi Marcia,

I tested the code from the other topic and it still works with the current version of Event Espresso 4. Did you happen to add that code to the WordPress theme’s functions.php file, then run an update on your theme? If so, then that code is gone. You can avoid losing the custom code You can add the above to a functions plugin. If you’ve added the code to a functions plugin, can you check to make sure the plugin is activated?


Marcia Chadly

June 21, 2017 at 4:40 pm

I’ll check with our website support person and get back to you. He wasn’t seeing this being called currently.

Thank you – Marcia


Marcia Chadly

June 21, 2017 at 7:16 pm

Hi Josh,

This is from our website support person:

“I restored the site to its pre-update state, and started to update one plugin at a time. When I updated Event Espresso from 4.9.38 to 4.9.42, the registration section begins to show twice again.

They may see it working properly when they test it, but there is definitely something happening that directly involves the Event Espresso plugin.”

Any ideas?

In Connection, Marcia


Marcia Chadly

June 21, 2017 at 7:28 pm

Hi Josh,

I was just looking around various EE setting when I found this note by the “Use Custom Display Order” setting. Which I do have set to yes.

“Please Note:
If you are currently using filters to customize the display order for elements within the Event Single page display, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.”

Has this recently changed? Maybe it is behind this problem?

I want to display the event description first and then the dates/times. I was using the Custom Display Order setting to do that. I also want put the ticket selector section within the event description so I was using the shortcode and the ee_display_ticket_selector_once to do that.

This all seemed to work until the date to 4.9.42

In Connection,
Marcia


Josh

  • Support Staff

June 22, 2017 at 10:24 am

Has this recently changed? Maybe it is behind this problem?

No that has not recently changed. What may be happening on your site could be related to caching. In which case your website support person can add the following code to the custom plugin:

add_filter(
  'FHEE__EventEspresso_core_services_shortcodes_EspressoShortcode__shortcodeContent__cache_expiration',
  'my_custom_shortcode_cache_expiration',
  10,
  3
);
function my_custom_shortcode_cache_expiration( $cache_expires, $get_tag, $shortcode) {
  if ( $get_tag == 'ESPRESSO_TICKET_SELECTOR' ) {
    $cache_expires = 0;
  }
  return $cache_expires;
}


Marcia Chadly

June 22, 2017 at 2:50 pm

That worked – thanks! Marcia

Viewing 6 reply threads

The support post ‘ee_display_ticket_selector_once()’ 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