Render correct date format from custom field

WooCommerce
March 28, 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
March 28, 2023 03:00:29
E2Pdf
Topics: 7
Messages: 3617
Support
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!
March 28, 2023 03:47:42
j.durand
Topics: 8
Messages: 29
Logic...
Thank you!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.