• Resolved billdodd007

    (@billdodd007)


    Hi, the standard CSV import works well. I use the events and tickets pro version. However I want to update other fields in the Products and Events ‘posts’. Also be able to add some ‘advanced custom fields pro’ fields that are accessed and displayed by the events and tickets (products) posts. I was given the below code from the Tribe Events support, but it does not work. Can any body give me any working code or explanation. Many thanks. 🙂 Bill


    add_filter( 'tribe_events_importer_event_column_names', 'my_event_column_names' ); function my_event_column_names( array $column_names ) {
    // Here define all the custom CSV import columns you need.
    $column_names['event_slug'] = 'Event Slug';
    $column_names['event_id'] = 'Event ID';

    return $column_names;
    }

    add_filter( 'tribe_events_csv_import_event_additional_fields', 'my_tag_csv_import_event' ); function my_tag_csv_import_event( array $additional_fields ) {
    // Here define how custom columns will become part of the wp_insert_post or wp_update_post payload.
    // This is just an example.
    $additional_fields['post_name'] = 'event_slug';

    return $additional_fields;
    }

    // Priority 100 to go after the rest of TEC and PRO hooked code.
    add_action( 'tribe_events_event_save', 'my_event_updates', 100, 3 ); function my_event_updates( $event_id, $data, $event ) {
    $origin = get_post_meta( '_tribe_aggregator_origin', true );
    if ( $origin !== 'csv' ) {
    return;
    }

    // Here run custom updates on the event and its related posts.
    }

    However it does not work and I cannot fathom how I can do this. Can you help.
    Fields I want to add are:-
    Sold individually
    Purchase Note
    Product Tag
    And an advanced custom field in Products called Reference.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there @billdodd007

    Thanks for reaching out.

    From the looks of things, you’re using the pro version of our plugins on your website.

    We are restricted from providing support for our paid plugins here, but you can open a ticket for our premium support channels by going to https://theeventscalendar.com/support/

    Best regards,

    Marho

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @billdodd007,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Best,
    Abz

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘importing – customise the fields’ is closed to new replies.