• Resolved chelles4

    (@chelles4)


    Hi, I am wondering is there a way to get the transaction ID to show on the order email that comes through to us? We use this for accounting purposes and while we can log into our account to get this it would be more convenient and less time consuming not to have to.

    Many Thanks

    Michelle

Viewing 1 replies (of 1 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @chelles4,

    Standard WooCommerce provides filters that you can hook in to to add information to the Admin New Order email.

    I believe the hook you should use is woocommerce_email_order_meta_fields which you can locate in the woocommerce/includes/class-wc-emails.php file.

    Here is an example.

    function add_my_custom_email_fields($fields, $sent_to_admin, $order){
        $fields[] = array(
             'label' => 'Transaction ID:',
             'value' => $order->get_transaction_id()
        );
        return $fields;
    }
    add_filter('woocommerce_email_order_meta_fields', 'add_my_custom_email_fields', 10, 3);
    
Viewing 1 replies (of 1 total)
  • The topic ‘Transaction ID’ is closed to new replies.