• davey1975

    (@davey1975)


    How do i call for the custom product meta data for a pick ticket template in php?
    I’ve tried using the label and ID as the key and value with no success.

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter davey1975

    (@davey1975)

    Here is my code but it doesn’t show any meta data:

    <?php 
    // Get Brand of Shoe custom field value
    $brand_of_shoe = isset($item['meta_data']['65d7a9ddeeef1']) ? $item['meta_data']['65d7a9ddeeef1'] : '';
    if (!empty($brand_of_shoe)): ?>
        <div>Brand of Shoe: <?php echo esc_html($brand_of_shoe); ?></div>
    <?php endif; ?>
    
    <?php 
    // Get Shoe Size custom field value
    $shoe_size = isset($item['meta_data']['65d7aab94cdbd']) ? $item['meta_data']['65d7aab94cdbd'] : '';
    if (!empty($shoe_size)): ?>
        <div>Shoe Size: <?php echo esc_html($shoe_size); ?></div>
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘retrieve custom field meta data’ is closed to new replies.