Forum Replies Created
-
AuthorPosts
-
Riccardo
ParticipantThis reply is private.
Riccardo
ParticipantHi Geoff,
sorry. Now I add the code in functions.php of my child theme.
but the result is the same.
the translations don’t work if I put “the-events-calendar-it_IT.mo” and “the-events-calendar-it_IT.po” in the wp-content/languages/ folderthanks
Riccardo
ParticipantThis reply is private.
Riccardo
ParticipantHi Geoff,
I put this code in my functions.phpunload_textdomain( 'the-events-calendar' ); load_plugin_textdomain( 'the-events-calendar', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );I create wp-content/languages/the-events-calendar/
I put the “the-events-calendar-it_IT.po” and “the-events-calendar-it_IT.mo” in this folder but it doesn’t work
I put I put the “the-events-calendar-it_IT.po” and “the-events-calendar-it_IT.mo” in the sub folder wp-content/languages/the-events-calendar/languages/ it doesn’t workI create wp-content/languages/plugins/the-events-calendar and it doesn’t work
I create wp-content/languages/plugins/the-events-calendar/languages/ and it doesn’t workWhat is my error?
thanksRiccardo
ParticipantHi Geoff,
thanks, but where I have to put your code?
thanksRiccardo
ParticipantThanks Hunter!
Riccardo
ParticipantHi,
I have a problem.
If I add your code, I have to return to my site to complete order.
If I use the other plugin I don’t have to return.
what is the best solution?
thanksRiccardo
ParticipantHi,
thanks Hunter.
I try to add this with the plugin “WooCommerce – Autocomplete Orders”.
now in the events ticket plus I don’t have flag “Try to set the status of new ticket orders to “complete” automatically” but I add the code to the functions.php/** * Auto Complete all WooCommerce orders. */ add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); function custom_woocommerce_auto_complete_order( $order_id ) { if ( ! $order_id ) { return; } $order = wc_get_order( $order_id ); $order->update_status( 'completed' ); }And now it works.
Is it the right mode or I have to flag “Try to set the status of new ticket orders to “complete” automatically” in the ticket options?
thanksApril 25, 2016 at 3:06 pm in reply to: Display "Attendee Information" on email confirmation #1106835Riccardo
ParticipantHi Cliff,
thanks.
now the right code is it
thanksadd_action( 'woocommerce_email_order_details', 'kia_custom_order_details', 5, 4 ); function kia_custom_order_details( $order, $sent_to_admin, $plain_text, $email ){ // se email è non dell'utente che ha comprato la data if( $email->id != "customer_processing_order" ){ $course_date = null; // the loop : recupero gli oggetti comprati dall'ordine $items = $order->get_items(); //recupero id dell'ordine $ordine_id = $order->id; // recupero tutti i particolare del biglietto per poi trovare altri campi personalizzati $meta_ticket= get_post_meta($ordine_id, '_tribe_tickets_meta', true); // NOME PARTECIPANTE - TEMPO SUL GIRO - CILINDRATA MOTO //Array con nome partecipante $nome_partecipante = array(); //Array con tempo sul giro $tempo_sul_giro = array(); //Array con cilindrata moto $cilindrata_moto = array(); foreach ($meta_ticket as $info_ticket){ $info_ticket_fields = $info_ticket; foreach ($info_ticket_fields as $single_field){ $nome_partecipante[] = $single_field['nome-partecipante']; $tempo_sul_giro[] = $single_field['tempo-sul-giro']; $cilindrata_moto[] = $single_field['cilindrata-moto']; //chiudo il secondo foreach } // chiudo il primo foreach } //conto gli elementi dell'array $conta_numero_partecipanti = count($nome_partecipante); $conta_tempo_sul_giro = count ($tempo_sul_giro); $conta_cilindrata_moto = count ($cilindrata_moto); if (($conta_cilindrata_moto>0)&&($conta_numero_partecipanti>0)&&($conta_tempo_sul_giro>0)){ echo 'Ecco i dettagli dei biglietti: <br>'; for($indice=0; $indice<$conta_numero_partecipanti; $indice++){ echo ' <strong>Nome: </strong>'.$nome_partecipante[$indice].'<br> <strong>Tempo sul giro: </strong>'.$tempo_sul_giro[$indice].'<br> <strong>Cilindrata moto:</strong> '.$cilindrata_moto[$indice].'<br><br>'; } } // chiudo l'if } //chiudo la funzione }-
This reply was modified 9 years, 11 months ago by
Riccardo.
April 25, 2016 at 10:24 am in reply to: Display "Attendee Information" on email confirmation #1106724Riccardo
ParticipantHi Cliff,
the first foreach is for the product in the order
the second foreach is for the meta of product
the third foreach is for the ATTENDEE INFORMATION in the meta of product.Where I am wrong ?
thanksApril 24, 2016 at 7:34 am in reply to: Display "Attendee Information" on email confirmation #1106407Riccardo
ParticipantHi Cliff,
the foreach twice is for the multidimensional array.
if I don’t I don’t have the datas.
Have you a suggestion?
thanksMy final target is retrieve the data for each ticket in the table summary.
thanksApril 22, 2016 at 9:28 am in reply to: Display "Attendee Information" on email confirmation #1105947Riccardo
ParticipantHi Cliff,
this is the code I do:add_action( 'woocommerce_email_order_details', 'kia_custom_order_details', 5, 4 ); function kia_custom_order_details( $order, $sent_to_admin, $plain_text, $email ){ if( $email->id != "customer_processing_order" ){ // retrieve items $items = $order->get_items(); foreach ( $items as $item ) { //recupero id del prodotto venduto - retrieve product id $product_id = $item['product_id']; //recupero id dell'ordine - retrieve order id $ordine_id = $order->id; $prova2 = get_post_meta($ordine_id, '_tribe_tickets_meta', true); foreach ($prova2 as $pette){ $nome_partecipante = $pette; foreach ($nome_partecipante as $merda){ echo $merda['nome-partecipante'].' - '.$merda['tempo-sul-giro'].' - '.$merda['cilindrata-moto'].'<br>'; } } } } }nome-partecipante – tempo-sul-giro – cilindrata-moto
are my attendee information for the ticket, but if this EVENT has more tickets, for example 2 tickets, I have a duplicate result:
partecipo – 1,45 – 9000
partecipo – 1,45 – 9000because the ticket in the events are two different but only one has a special fields.
how can I display only the information once?thanks
April 22, 2016 at 6:15 am in reply to: Display "Attendee Information" on email confirmation #1105857Riccardo
ParticipantHi Cliff,
in the files you list me there is not the function “get_attendees()”
So, how can I retrieve the Attendee Information I add in the ticket info?
thanksApril 21, 2016 at 6:47 am in reply to: Display "Attendee Information" on email confirmation #1105321Riccardo
ParticipantHi Cliff PD,
so, how can I retrieve the attendee information?
there are some classes or function?
thanksRiccardo
ParticipantHi,
in my case the best solution is hide with css.
thanks -
This reply was modified 9 years, 11 months ago by
-
AuthorPosts
