Title: Product code
Last modified: August 30, 2016

---

# Product code

 *  [kkriss](https://wordpress.org/support/users/kkriss/)
 * (@kkriss)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/)
 * Hi. Is it possible to add the product code in the wishlist page? Thank you
 * [https://wordpress.org/plugins/yith-woocommerce-wishlist/](https://wordpress.org/plugins/yith-woocommerce-wishlist/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/#post-6609024)
 * Hi kkriss,
 * Do you mean the SKU?
 * In this case, you’l need to add a custom column to your wishlist template; follow
   this steps:
 * 1. Copy **wishlist-view.php** template from _wp-content/plugins/yith-woocommerce-
   wishlist/templates_ to your theme root
    2. Edit this new file as follow
 * a. Increase non-optional column count from 2 to 3 at line 53
 *     ```
       <?php $column_count = 3; ?>
       ```
   
 * b. Add a column to thead (i.e. after product name, at line 80)
 *     ```
       <th class="product-sku">
           <span class="nobr"><?php _e( 'Cod.', 'yith-woocommerce-wishlist' ) ?></span>
       </th>
       ```
   
 * c. Add column content to tbody (if you want to insert this after product name,
   you will add td at around line 162)
 *     ```
       <td class="product-sku">
           <?php echo ( ! empty( $product->sku ) ) ? $product->sku : __( 'N/A', 'yith-woocommerce-wishlist' ) ?>
       </td>
       ```
   
 * Here there are some screen of the test on my local installation
 * [http://screencast.com/t/w0w9mBCqOwD](http://screencast.com/t/w0w9mBCqOwD)
    [http://screencast.com/t/WjXKpQ0E](http://screencast.com/t/WjXKpQ0E)
 * Let me know if this helps
    Have a nice day 🙂
 *  Thread Starter [kkriss](https://wordpress.org/support/users/kkriss/)
 * (@kkriss)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/#post-6609025)
 * Hi.
   Thanks for your answer but I meant the ordinary Product Code, the one that
   is shown on the right of the product image in the single product page (front 
   end), not the SKU. And, in case of adding those lines of code, everything else
   regarding Woocommerce would work nicely or maybe it can cause some issues? Thank
   you
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/#post-6609026)
 * Hi
 * I’m sorry, but I’m not sure what code you want to print. Unfortunately I can’t
   find the code you’re describing on [default woocomerce single product page](http://screencast.com/t/gIdBxWWQ7U)(
   maybe your theme add this information in your page)
 * Do you mean WP post ID (the one that you can find in your product admin page 
   [here](http://screencast.com/t/QOJt6FKWBQQ))?
 * As regards your second question, I’d be very surprised if something in the code
   I suggested you could manage to break some woocommerce default behaviour 😉
 * Anyway, before customize something, is always a good practice to make a backup
   copy of your files, just in case 🙂
 *  Thread Starter [kkriss](https://wordpress.org/support/users/kkriss/)
 * (@kkriss)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/#post-6609029)
 * [Please see here](https://www.dropbox.com/s/u2uarjnh07k1tdq/ss-product-code.jpg?dl=0)
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/#post-6609033)
 * Ciao
 * vedo che sei italiano, quindi ti rispondo anche in italiano 🙂
    Mi spiace, ma
   anche avendo lo screen che mi hai mandato, non posso capire che tipo di dato 
   viene recuperato dal database (se un postmeta – e in tal caso qual è la sua key–
   se lo sku, o se qualcosa calcolato dall’id del prodotto) Puoi trovare il pezzo
   di codice che stampa questo codice?
 * Fammi sapere!
 * Hi,
 * I’m sorry, but the screen doesn’t help me to understand what data is print in
   single product page, and where it is stored in WP database.
    Can you find php
   code that prints this cod?
 * Let me know!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Product code’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-wishlist/assets/icon-128x128.gif?rev=3129302)
 * [YITH WooCommerce Wishlist](https://wordpress.org/plugins/yith-woocommerce-wishlist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-wishlist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-wishlist/reviews/)

## Tags

 * [product code](https://wordpress.org/support/topic-tag/product-code/)

 * 5 replies
 * 2 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/product-code/#post-6609033)
 * Status: not resolved