Hi @reelboldmedia,
You can try using the function $order_obj->get_customer_note(); to get the customer notes.
Product Image can be fetched using the variation ID. So taking an example of the request-new-quote.php file.
It contains an existing foreach loop for the order items, where $items is the item object.
The ID (product or variation) can be fetched using the below code:
$image_id = isset( $items->get_variation_id() ) && $items->get_variation_id() > 0 ? $items->get_variation_id() : $items->get_product_id();
The image can then be fetched as below:
$image = get_the_post_thumbnail( $image_id, $size );
where $size = array( <width>, <height>, 1)
I hope this helps.
Thanks,
Pinal
Hello was messing around with the project and this expression causes errors $image_id = isset( $items->get_variation_id() ) && $items->get_variation_id() > 0 ? $items->get_variation_id() : $items->get_product_id();
The error is Cannot use isset() on the result of an expression (you can use “null !== expression” instead) [duplicate]
How do we use the expression right before the names of the products on the template file?
Hi @davidw09,
In that case, you could possibly try the below:
$image_id = null !== $items->get_variation_id() && $items->get_variation_id() > 0 ? $items->get_variation_id() : $items->get_product_id();
Please note that this is untested code.
Thanks,
Pinal