• Resolved remitur

    (@remitur)


    Hello.
    Using Stripe payment module, I would like to insert the details of Stripe payment into the invoice.
    I found that the following code works fine to insert transaction id:

    Payment via Credit Card (trans-id <?php echo $order->get_meta('_transaction_id'); ?></span>

    Instead following code, to insert the date of payment, does not work:

    paid date: <?php echo $order->get_meta('_paid_date'); ?></span>

    Any idea why it does not work?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Maybe _paid_date is not the correct meta key for the second data?

    See this article to learn how to check the meta keys stored in the order: Finding WooCommerce custom fields

    Thread Starter remitur

    (@remitur)

    @yordansoares

    >Maybe _paid_date is not the correct meta key for the second data?

    Nope: it’s right; in admin area about this order I can find:

    _cpsw_stripe_currency	EUR	
    _transaction_id	ch_3NEbxoGsKzzXrxLh13xTLSG5	
    _date_completed	1685727639	
    _date_paid	1685727639	
    _paid_date	2023-06-02 16:40:39	
    _completed_date	2023-06-02 16:40:39
    • This reply was modified 3 years ago by remitur.
    Plugin Contributor Yordan Soares

    (@yordansoares)

    Sorry for the late reply, @remitur: Half of the team were on vacation last week, attending WordCamp Europe.

    Did you try with paid_date, without underscore, instead? I mean, with something like this:

    <?php echo $order->get_meta('paid_date'); ?>
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Inserting Stripe transaction data into invoice’ is closed to new replies.