Hello,
I’ve tried to translate events, via WPML but, whenever I select different language I get this message regarding tickets: This event has sold out.
Hope there is some kind of solution.
regards,
ghRiko
Riko Gregor Hirsl
Hi Riko,
I believe this maybe because WPML creates a post for each translation and the booking form is attached is (by default) attached to the event’s content. Since the translation is not considered a proper event (or at least has now tickets associated to it) the tickets don’t appear.
To test this theory could you try using the booking form shortcode and specifying the event id: http://wp-event-organiser.com/pro-features/shortcodes/booking-form-shortcode/ and removing the ‘automatic’ booking form:
add_filter( 'eventorganiser_pro_get_option_disable_automatic_form', '__return_true' );
WPML give free licenses to developers who need to fix compatibility issues, so in the mean time I’ll obtain a copy to see if a permanent fix can be found.
Stephen Harris
Hi Stephen,
I have the same problem.
I try to use the booking form shortcode
<?php echo do_shortcode('[event_booking_form event_id='.get_the_ID().' ]'); ?>
in the single-event teplate file, but the result is the same “This event has sold out.”.
Can you help me please?
thanks
Alberto Riolfo
In the single event template, try this:
global $sitepress;
$translated_event_id = get_the_ID();
$default_lang = sitepress->get_default_langage();
$source_event_id = icl_object_id( $translated_event_id, 'event', true, $default_lang );
//$source_event_id should now be the original event ID
echo eo_get_booking_form( $source_event_id );
Please note this is untested.
Stephen Harris