Title: makemagik's Replies | WordPress.org

---

# makemagik

  [  ](https://wordpress.org/support/users/makemagik/)

 *   [Profile](https://wordpress.org/support/users/makemagik/)
 *   [Topics Started](https://wordpress.org/support/users/makemagik/topics/)
 *   [Replies Created](https://wordpress.org/support/users/makemagik/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/makemagik/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/makemagik/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/makemagik/engagements/)
 *   [Favorites](https://wordpress.org/support/users/makemagik/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Gift Cards] Gift code not showing in admin email](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/)
 *  Thread Starter [makemagik](https://wordpress.org/support/users/makemagik/)
 * (@makemagik)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/#post-16822144)
 * The product was indeed a gift card. I saw the code on the order page when it 
   processed (see screenshot). 
   No modification to the plugin was made. Only the
   code added to the theme file. As said, I am using an empty WordPress installation.
 * I will remake a new setup and reinstall the plugin and do some test and get back
   to you.
 * ![](https://i0.wp.com/i.imgur.com/aRZewVy.png?ssl=1)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Gift Cards] Gift code not showing in admin email](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/)
 *  Thread Starter [makemagik](https://wordpress.org/support/users/makemagik/)
 * (@makemagik)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/#post-16815649)
 * Hi there,
 * It’s almost what I’ve done, see the code below. I used a else to check if the
   variable was empty and it is.
 *     ```wp-block-code
       function ski_show_gift_card_code_on_email( $order_item_id, $item, $order ) {
   
       $code = wc_get_order_item_meta( $order_item_id, '_ywgc_gift_card_code', true );
   
       if ( ! empty( $code ) ) {
   
       printf( '<br>' . __( 'Code de la carte cadeau: %s', 'yith-woocommerce-gift-cards' ), $code[0] );
   
       } else {
   
       printf('<br>Empty %s: ', $order_item_id);
   
       }
   
       }
       ```
   
 * The **Empty** shows up in the email.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Gift Cards] Gift code not showing in admin email](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/)
 *  Thread Starter [makemagik](https://wordpress.org/support/users/makemagik/)
 * (@makemagik)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/#post-16806761)
 * The hook is working properly. I have added some custom content to the output 
   and it does indeed output and shows in the email. I would definitely want to 
   buy the premium version but I need to have this figured out.
 * Also, keep in mind that I have made a blank setup with WordPress, WooCommerce
   and YITH Gift Card plugin using the **Twenty Twenty-Three** theme. Therefore,
   I’m pretty confident no other action is ran on that specific hook. All latest
   version also.
    -  This reply was modified 3 years, 1 month ago by [makemagik](https://wordpress.org/support/users/makemagik/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Gift Cards] Gift code not showing in admin email](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/)
 *  Thread Starter [makemagik](https://wordpress.org/support/users/makemagik/)
 * (@makemagik)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/gift-code-not-showing-in-admin-email/#post-16800886)
 * Hi Hector, I used the second code indeed.
   This issue happens to the New order
   email. I haven’t checked the completed one, but it should show up in the New 
   order email anyway.There’s no PDF attached to this email. The code was placed
   inside the functions.php.

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