Get Product Name and Description in WooCommerce email templates
I am trying to get product descripton and the product name when email is sent in WooCommerce email templates. I am able to get product id $order_id = trim(str_replace('#', '', $order->get_items())); using this code But when I am trying to get its description and product name I am not able to do the same. My code: $order = new WC_Order($order_id); foreach($order->get_items() as $item){ $product_description = get_post($item['product_id'])->post_content; } How can I make it work? Thanks I added this in function.php what i ma trying to do is after the order is set completed i am trying to send sms