WPML translations have tickets sold out

WordPress Event Management, Calendars & Registration Forums Report A Bug WPML translations have tickets sold out

This topic contains 3 replies, has 3 voices, and was last updated by  Stephen Harris 9 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8771

    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
    #8773

    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
    #11790

    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
    #11817

    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
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.