So I have a custom product field “Time” for which I want to output this field’s value on the Woocommerce checkout, specifically in the product details, under product name, to have it like this: Event time: (value from wcv_custom_product_field)

I’ve tried placing :

add_filter( 'woocommerce_get_item_data', 'wc_checkout_producttime', 10, 2 );

function wc_checkout_producttime( $other_data, $cart_item )
{
    $_product = $cart_item['data'];

    $other_data[] = array( 'name' =>  'wcv_custom_product_field', 'value' => $_product->get_wcv_custom_product_field() );
return $other_data;
}

But I’m getting blank page on the checkout.

Read more here: How to add additional product information on Woocommerce checkout page?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: