Hi @erling,
You can try to add the following hooks on the next file:
yith-event-tickets-for-woocommerce\templates\tickets\default-html.php
<div id="content_title">
<h2><?php
if('on' == $display_ticket_number){
echo '#' . $post->ID . ' ';
}
echo $post->post_title; ?></h2>
<?php do_action('yith_wcevti_default_html_after_title', $post) ?>
</div>
As you see we only added the do_action('yith_wcevti_default_html_after_title', $post)
hook. We will apply this hook on the next plugin version.
Now from your functions.php from your active theme add the following code:
if ( ! function_exists( 'set_after_title_template' ) ) {
function set_after_title_template( $post ) {
$order_id = get_post_meta($post->ID, 'wc_order_id', true);
$order = wc_get_order($order_id);
$first_name = $order->get_billing_first_name();
echo ' purchased by '. $first_name;
}
}
add_action('yith_wcevti_default_html_after_title', 'set_after_title_template');
Here we are getting the order info from ticket and getting the first name from billing order for example.
Please try this and let me know if you find some problem.
Regards.
-
This reply was modified 7 years, 1 month ago by YITHEMES.
-
This reply was modified 7 years, 1 month ago by YITHEMES.