• I have purchase product addons from woocommerce. I realize that after customer has input some custom data in the product list. After customer done checkout, i am not able retrieve custom data from customer on order list.

    Is there any codes, that allows me to add in to display the custom data in order page in admin side. I have tried do so, but I found difficulties.

    function my_custom_checkout_field_display_admin_order_meta($item_meta, $cart_item){
    if (isset($cart_item[‘addons’])):
    $cart_item[‘addons’] as $addon
    $value = $addon[‘value’];
    echo ‘<p>‘.__(‘Custom Data’).’: ‘ . $item_meta->add($addon[‘value’]. ‘</p>’

    endif;
    }

    add_action( ‘woocommerce_admin_order_data_after_billing_address’, ‘my_custom_checkout_field_display_admin_order_meta’, 10, 2 );

    Thanks.

  • The topic ‘Product addons not able to display input data in order list’ is closed to new replies.