• At present, my email order displaying all the attributes which are there on the product page. However, I only want to display some attributes like color and delivery.

    /templates/emails/email-order-items.php
    Here is the code… What changes do I have to do?

    // Variation
            if ( $item_meta->meta ) {
                echo '<br/><small>' . nl2br( $item_meta->display( true, true ) ) . '</small>';
            }

    https://www.ads-software.com/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • You should be able to just change a little piece in code to
    get the attributes.

    // Variation
    if ( $item_meta->meta ) {
    echo ‘
    <small>’ . nl2br( $item_meta->display( true, true ) ) . ‘</small>’;
    }

    The bolded area should be $_product->get_attribute( ‘delivery’ )
    Hope this works for you.

    J.A

    Thread Starter creativemind1

    (@creativemind1)

    Hey actually I’ve got this yesterday itself, but how can I display the same code in the admin-order.php along with the label?

    There’s actually a plugin that does that and more.
    Specifically displaying the custom attributes on the order’s page.
    https://www.ads-software.com/plugins/woocommerce-show-attributes/

    J.A

    Thread Starter creativemind1

    (@creativemind1)

    Well, the problem is displaying the attributes at the email-header as per client’s wish not just displaying it. Now, I know how to display and hide but now I need to know how to display it at the desired location.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to display/hide desired attributes in Woocommerce email order’ is closed to new replies.