Support

Home Forums Event Espresso Premium org_options always null

org_options always null

Posted: August 6, 2017 at 11:43 pm

Viewing 3 reply threads


rhumphrey

August 6, 2017 at 11:43 pm

Hi, this question may sound simple, but i sure cant figure out what is wrong.

I am creating a custom shortcode on functions.php, and need to display a currency sign for a particular ticket price. I have seen numerous documentation saying its accessible thru global variable $org_options, but somehow my global $org_options is always returning null (note that global $wpdb works just fine)

I’m using event espresso 4.9.45.p, wordpress theme osmosis. Please help. Thanks in advance..


Tony

  • Support Staff

August 7, 2017 at 5:30 am

Hi there,

$org_options would be a global from EE3, your using EE4.

With EE4 we have a helper function that can be used to format the currency to whatever settings used within EE.

EEH_Template::format_currency() which takes multiple paramters but doing something like:

$amount = 10.00;
echo EEH_Template::format_currency( $amount )

Will return the price with the currency symbol and other details if needed.


rhumphrey

August 7, 2017 at 8:24 pm

Hi Tony, thanks so much. I got a feeling it has to be something very simple… I didnt find documentation with helper function, took me hours to find out if something changed org_options somewhere. Thanks for the direction..


Tony

  • Support Staff

August 8, 2017 at 2:09 am

You’re most welcome.

Viewing 3 reply threads

The support post ‘org_options always null’ 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