Search code examples
wordpresswoocommercehook-woocommercewoocommerce-theming

Displaying an image on WooCommerce Order Page


I am working on a pharmacy ecommerce mobile based project where a customer can create an order for some medicines and could additionally submit the prescription as a photo taken through the mobile cam. The back-end side for the project is based on WordPress and Woo-commerce. The prescription photo will be submitted as part of the order meta data and I will save it to the uploads file and I already did that. What I need is being able to render that submitted prescription when viewing the order in all order view pages and I do not know how to do that as I am completely new to WordPress and especially Woo-commerce so can anyone help me telling me the steps I can follow what hooks I can use to get the job done!

I searched for available hooks and I found a woo-commerce visual guide it helped a bit, however, I do not know how to get the current displayed order and specifically gets it meta data

To be able to view an order related prescription photo if any on all woocommerce order view pages


Solution

  • I found what is called Woocommerce visual guide that contains some hooks that can be used to add content to various Woocommerce pages WooCommerce Hooks Guide I found also others hooks that could be used to adjust the admin previews for order like woocommerce_admin_order_preview_get_order_details and woocommerce_admin_order_preview_end