Got it!
First I store the current event ID in a variable, then I look in the base which post have a key ‘_tribe_wooticket_for_event’, and among these which one has it equal to the ID of the event.
I store HIS ID in a new variable.
I use that variable in the get_post_meta() function.
I even grabbed the currency symbol to display it behind and not before the price.
$id = get_the_ID();
global $wpdb;
$mos_articles = $wpdb->get_results(
”
SELECT post_id
FROM $wpdb->postmeta
WHERE meta_key = ‘_tribe_wooticket_for_event’
AND meta_value='” .$id. “‘
”
);
foreach ( $mos_articles as $mon_bilhet )
{
$mon_bon_bilhet = $mon_bilhet->post_id;
}
$meta_monuda = get_post_meta( get_the_ID(), ‘_EventCurrencySymbol’, true );
$meta_pretz = get_post_meta( $mon_bon_bilhet, ‘_regular_price’, true );
echo ‘|’.$meta_pretz.’ ‘.$meta_monuda. ”;
Thank you for telling me if this non-academic workaround can cause any problem.