Forum Replies Created
-
AuthorPosts
-
Carlos Henrique
ParticipantGeorge,
The code is not working. It is not removing the action.
Any toughts why?
Thanks
Carlos Henrique
ParticipantGeorge,
I’m trying not to edit the core files, I’m thinking if it is possible to do a remove_action in the functions.php of my theme and then do a add_action if my customization. I’m talking about the following action found in the Render.php file.
add_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $this, 'ticket_email_meta' ) );Is it possible to hook this in my function file?
Thanks
Carlos Henrique
ParticipantHi George!
I’m almost there. Send the meta data in the e-mail is what I need.
One last thing: can I remove the default action and create a new one with my tweaks in the functions.php file? If so, can you assist me?
Thanks
Carlos Henrique
ParticipantHi George!
Thanks exactly what I needed! Now I just need to hide some of the data. I only need to show first and last name and the company name. Can I customize this overriding email.php template file or I is it in another file?
Thanks
Carlos Henrique
ParticipantHi George!
I don’t need all the meta data into the e-mail, but I need at least the name of the attendee and not the name of the buyer. In this case, the attendee is the person how buys the tickets.
As my website will allow companies to by multiple tickets, each ticket has to have the attendee data and not the buyer data. As the buyer, oftenly is a secretary.
I’ve attached a screenshot of the attendees meta data.
Thanks for your help.
Carlos Henrique
ParticipantHello Geoff!
I’m still trying to get the meta data into the e-mail.
Looking the Render.php file I found the function that builds the table in the back-end. Ins’t it possible to get the meta data using this code?
public function table_meta_data( $item ) { wp_enqueue_style( 'event-tickets-meta' ); wp_enqueue_script( 'event-tickets-meta-report' ); $meta_fields = Tribe__Tickets_Plus__Main::instance()->meta()->get_meta_fields_by_ticket( $item['product_id'] ); $meta_data = get_post_meta( $item['attendee_id'], Tribe__Tickets_Plus__Meta::META_KEY, true ); ?> <tr class="event-tickets-meta-row"> <td colspan="3"></td> <td colspan="4"> <dl> <?php foreach ( $meta_fields as $field ) { if ( 'checkbox' === $field->type && isset( $field->extra['options'] ) ) { $values = array(); foreach ( $field->extra['options'] as $option ) { $key = $field->slug . '_' . sanitize_title( $option ); if ( isset( $meta_data[ $key ] ) ) { $values[] = $meta_data[ $key ]; } } $value = implode( ', ', $values ); } elseif ( isset( $meta_data[ $field->slug ] ) ) { $value = $meta_data[ $field->slug ]; } else { continue; } if ( '' === trim( $value ) ) { $value = ' '; } ?> <dt class="event-tickets-meta-label_<?php echo esc_attr( $field->slug ); ?>"><?php echo esc_html( $field->label ); ?></dt> <dd class="event-tickets-meta-data_<?php echo esc_attr( $field->slug ); ?>"><?php echo $value ? esc_html( $value ) : ' '; ?></dd> <?php } ?> </dl> </td> </tr>Carlos Henrique
ParticipantGeoff,
This is the code for this specific field:
<div class="tribe-tickets-meta tribe-tickets-meta-text tribe-tickets-meta-required"> <label for="tribe-tickets-meta_name">Name</label> <input type="text" id="tribe-tickets-meta_name" class="ticket-meta" name="tribe-tickets-meta[][name]" value="" required> </div>I’ve tried to echo that code and also got Internal Error on the checkout page.
Carlos Henrique
ParticipantHi Geoff,
I’ve placed the code into the template file but I doing some wrong. I getting a Internal Error on checkout page and I insert the code.
Could you assist me a little more?
I have place the following code inside the for-each loop for de meta ID “tribe-tickets-meta_name”:
$ticket_meta_name = get_post_meta( $attendee_id, Tribe__Tickets_Plus__Meta::tribe-tickets-meta_name, true );Then I placed this inside the table:
<?php echo $ticket_meta_name; ?>Thanks!
-
This reply was modified 9 years, 10 months ago by
Carlos Henrique.
Carlos Henrique
ParticipantAccidentally I hit the correct answer button! My bad!
Carlos Henrique
ParticipantActually I don’t need the e-mail to be sent to the attendees. It’s OK that the e-mail is sent only to the buyer. The problem is that I need each ticket with it’s attendee data. The system only gives me the purchaser name.
Looking throught the plugin files I found the table_meta_data function, wich builds the table of tickets and attendees meta in the back-end. Is there any way I can get this meta_data e pass it to the e-mail. That’s ok if I get all the meta data.
This data is stored somewhere in BD. I should be able to get it since it’s been displayed in the back-end for each ticket.
Thanks!
-
This reply was modified 9 years, 10 months ago by
Carlos Henrique.
-
This reply was modified 9 years, 10 months ago by
-
AuthorPosts
