• yovamacua

    (@yovamacua)


    Is there a way to include the purchase ID in the generated gift as well as the automatically generated code?

Viewing 1 replies (of 1 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    we hope you’re doing well!

    In order to achieve what you need, please, add the following code to the functions.php file of your active theme:

    if ( ! function_exists( 'yith_ywgc_add_order_number_gift_card_pdf' ) ) {
        function yith_ywgc_add_order_number_gift_card_pdf( $object ) {
            echo '<br><br>';
            echo wp_kses_post( '<tr><td><p><span style="font-weight: bold;">Order number: </span>#' . $object->order_id . '</p></td></tr>' );
        }
    
        add_action( 'yith_wcgc_template_after_message', 'yith_ywgc_add_order_number_gift_card_pdf', 10 );
    }

    Check it out and tell us if it works well for you, please.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Add ID Purchase into Giftcard’ is closed to new replies.