Cannot Get “Cost Description” Field from Event Price Gutenberg Block
-
I’m using The Events Calendar plugin v5.14.1 on WordPress v5.9.3 with “Active Block Editor for Events” enabled (ie Gutenberg is used for editing events in the backend). There is a block called “Event Price” that allows me to set a price as well as a description for that price. Screenshot here: https://imgur.com/2qojB9T
I can enter this field on the backend and then save/modify it when editing events. However, I can’t figure out how to echo this field in my custom templates on the frontend. The ‘tribe_get_cost()’ function does not reference it. If I var_dump the event object, I see its label in the object ‘_EventCostDescription’ but cannot find the value I set. And it appears in the object markup to be an array of one element that contains an empty string. This is what is echoed in the object:
["_EventCostDescription"]=> array(1) { [0]=> string(0) "" }
Again, though, this value is stored when I go to edit the event on the backend. Any ideas on how echo/use this value in my templates? I’m stumped, thanks in advance for any help!
- The topic ‘Cannot Get “Cost Description” Field from Event Price Gutenberg Block’ is closed to new replies.