Render correct date format from custom field

WooCommerce
28 March, 2023 00:55:54
j.durand
Topics: 8
Messages: 29
Hello again :)

I use the shortcode [e2pdf-wc-product key="we_startdate" meta="true" index="0" parent="true"] to render the start date of an event from woocommerce product into pdf order.

The result is 1679011200 instead of 17/03/2023

I don't know how have the good format here...

[e2pdf-wc-product key="we_startdate" order_item_meta="true" index="0"] works great but this the date from the product added to the order, I would like the date from the live product.

Best regards
28 March, 2023 03:00:29
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

The value is saved as a "timestamp". Using [e2pdf-format-date] with the "timestamp" attribute must solve the issue:

[e2pdf-format-date format="d/m/Y" timestamp="true"][e2pdf-wc-product key="we_startdate" meta="true" index="0" parent="true"][/e2pdf-format-date]

We remain at your service.
We would really appreciate your feedback at WordPress.org!
28 March, 2023 03:47:42
j.durand
Topics: 8
Messages: 29
Logic...
Thank you!