Title: Using COGS field in order e-mails
Last modified: July 21, 2019

---

# Using COGS field in order e-mails

 *  Resolved [toddpinil](https://wordpress.org/support/users/toddpinil/)
 * (@toddpinil)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/using-cogs-field-in-order-e-mails/)
 * I recently bought and installed the Cost of Goods plugin. This works great for
   tracking my COGS for my orders. However, I’d like to use the COGS field for one
   of my order e-mails. Specifically, I’m CCing my supplier on the New Order e-mail,
   and would like to use the COGS prices, not the retail prices.
    Alternately, is
   the COGS plugin compatable with the woocommerce dropship plugin, and could I 
   send my purchase orders (with the COGS field) that way.
 * It seems the e-mail generates an $orders string, and uses a function called get_items()???
   Sorry, all of my programming experience is from “back in the day” before everything
   was completely OOP. I can’t even track down WHAT I want to edit, much less how
   to do so.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-cogs-field-in-order-e-mails%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Algoritmika](https://wordpress.org/support/users/algoritmika/)
 * (@algoritmika)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/using-cogs-field-in-order-e-mails/#post-11757309)
 * Hi [@toddpinil](https://wordpress.org/support/users/toddpinil/),
 * You should be able to get COG from order items like this:
 *     ```
       foreach ( $order->get_items() as $item_id => $item ) {
           $item_cost = wc_get_order_item_meta( $item_id, '_alg_wc_cog_item_cost' );
       }
       ```
   
 * Please let me know if that helped.

Viewing 1 replies (of 1 total)

The topic ‘Using COGS field in order e-mails’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cost-of-goods-for-woocommerce_d0d4f0.
   svg)
 * [Cost of Goods: Product Cost & Profit Calculator for WooCommerce](https://wordpress.org/plugins/cost-of-goods-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cost-of-goods-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cost-of-goods-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/cost-of-goods-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cost-of-goods-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cost-of-goods-for-woocommerce/reviews/)

## Tags

 * [purchase order](https://wordpress.org/support/topic-tag/purchase-order/)

 * 1 reply
 * 2 participants
 * Last reply from: [Algoritmika](https://wordpress.org/support/users/algoritmika/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/using-cogs-field-in-order-e-mails/#post-11757309)
 * Status: resolved