Modifica OGGETTO email Nuovo Ordine WooCommerce
-
Ciao,
Io vorrei aggiungere nell’OGGETTO dell’email Nuovo Ordine di woocommerce i nomi dei prodotti e Nome e Cognome dell’acquirente. Vorrei provare con un codice di questo tipo:add_filter('woocommerce_email_subject_new_order', 'change_admin_email_subject', 10, 2); function change_admin_email_subject( $subject, $order ) { $products_names = array(); foreach ( $order->get_items() as $item ) { $products_names[] = $item->get_name(); } return sprintf( '[%s] New Customer Order (#%s) of %s from %s %s', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $order->get_id(), implode(', ', $products_names), $order->get_billing_first_name(), $order->get_billing_last_name() ); }
Qualcuno sa dirmi se può funzionare?
Grazie in anticipo per la risposta
- Il topic ‘Modifica OGGETTO email Nuovo Ordine WooCommerce’ è chiuso a nuove risposte.