Add product tag to receipts in Woocommerce
-
Hello All,
I understand how to manipulate the customer’s receipt in Woocommerce. Now all I need to do is just pull the product tag from whichever product they purchased, and place it on the receipt.
Does anyone know how to target the product tag? I thought it would be…
echo $product->get_tags();
But then I realized I had to put in the global variable $product in order for this to work.
global $product; echo $product->get_tags();
This ended up displaying the product tag IF I was on that products page.
Now the challenge is to somehow get this product tag on the order receipt, but keep in mind it’s not going to be on the product page anymore. So I can’t simple copy paste my little snippet into the receipt template. It returns nothing ??
So what do I need to do in order for it to check and see if there is a tag and then display the tag on the receipt?
:/ I’m searching the webz, but I’m not seeing any kind of solution. Any help would be greatly appreciated.
- The topic ‘Add product tag to receipts in Woocommerce’ is closed to new replies.