makemagik
Forum Replies Created
-
Forum: Plugins
In reply to: [YITH WooCommerce Gift Cards] Gift code not showing in admin emailThe 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.
Forum: Plugins
In reply to: [YITH WooCommerce Gift Cards] Gift code not showing in admin emailHi 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.
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
In reply to: [YITH WooCommerce Gift Cards] Gift code not showing in admin emailThe 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 1 year, 5 months ago by makemagik.
Forum: Plugins
In reply to: [YITH WooCommerce Gift Cards] Gift code not showing in admin emailHi 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.