Anonymous

My feedback

  1. 98 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    An error occurred while saving the comment
    Anonymous commented  · 

    Script to force all ticket images to update on save:

    /**
    * Automatically updates all ticket images to match the event image
    * @param $post_id - the post ID being savedTribe__Tickets__RSVP::get_instance()
    */
    add_action('save_post_tribe_events', function($post_id){
    if(wp_is_post_revision($post_id)) return; //Bail if this is a revision

    $tickets_provider = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
    $tickets = $tickets_provider->get_tickets_ids ( $post_id );

    foreach($tickets as $ticket_id) set_post_thumbnail($ticket_id, get_post_thumbnail_id($post_id));

    return;
    });

    An error occurred while saving the comment
    Anonymous commented  · 

    Script to force the ticket product image to match the event image:

    add_action('event_tickets_after_save_ticket', function($post_id, $ticket, $raw_data){
    set_post_thumbnail($ticket->ID,get_post_thumbnail_id($post_id));
    }, 10, 3);

    Anonymous supported this idea  · 

Feedback and Knowledge Base