Forum Replies Created

Viewing 3 replies - 31 through 33 (of 33 total)
  • Hey Haris6007,
    I was just passing by, Your code looks correct and is the same as what I am using, but I have mine within my Child – storefront Functions file. If you are using a Child theme, you need to put it within that I think.
    Perhaps the Moderator can provide some insight.

    Thread Starter mowlman

    (@mowlman)

    THANKS! Works Great.

    Thread Starter mowlman

    (@mowlman)

    No reply from developer, fixed myself. at least, this works for me.

    Files involved:
    /wp-content/plugins/woocommerce-delivery-notes/templates/print-order/print-content.php
    /wp-content/plugins/woocommerce-delivery-notes/templates/print-order/style.css

    1st override print-content.php. Create folder for woocommerce within your child Theme, then create a subfolder called print-order and place print-content.php within this. This is now the file you want to edit.

    What worked for me I placed my code just beneath </div><!– .order-addresses –> which is around line 49 of print-content.php

    `<?php /* Add Shopper Role to Receipt START */ ?>
    <div class=”shopper-role”>
    <h3><?php
    $cust_user = get_post_meta( $order->id, ‘_customer_user’, true ); //get user for order
    $user_info = get_userdata($cust_user); //get user info for user
    echo ‘Shopper Role : ‘ . ucwords(implode(‘, ‘, $user_info->roles)) . “\n”; //get the roles for the user & make them titlecase with ucwords

    /* Add Shopper Role to Receipt END */ ?></h3> </div><!– .shopper-role –>`

    Then after overriding style.css I added the following to control font size

    .shopper-role {
         font-size: 1.25em; 
    }
    • This reply was modified 7 years, 5 months ago by mowlman.
Viewing 3 replies - 31 through 33 (of 33 total)