Jump to content

Recommended Posts

I'm editing the e-mail templates on WordPress. I want to be able to get the product info from the order that the e-mail is about, so I can do stuff with it.

 

I need the product name/title, and can go on with it from there. Any help greatly appreciated.

We're going to need a lot more information than this to help at all.

 

What theme are you using? Have you created a child theme (you should have, if you're editing the files)? What e-commerce plugin are you using? Have you read the documentation for the theme and plugin?

Sorry, I'm using WooCommerce, and my own custom theme. I'm trying to enter this into the admin order e-mail file, and will carry it into the customer one later when ready.

 

I've googled a lot and tried a lot, but nothings working. What I need is the product name(s) in the order. Because of the nature of the business, it's likely only one product will be bought (or multiple of a single product).

I've not got a lot of experience with WooCommerce, but what I've found is that the product is a custom post type. Have you tried "get_posts( [productID] )"? It should return a WP_Post object - the post_title attribute should be the product name.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.