Show order creation time in PDF

[ad_1]

Hi @velpan,

Try with this code snippet to add the created time to the order date:

/**
 * PDF Invoices & Packing Slips for WooCommerce:
 * Customize the order date format
 */
add_filter( 'wpo_wcpdf_date_format', 'wpo_wcpdf_date_format', 10, 3 );
function wpo_wcpdf_date_format( $date_format, $document, $date_type ) {
	if( $date_type == 'order_date' ){
		$date_format  = wc_date_format() . ' ' . wc_time_format();
	}
	return $date_format;
}

If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

Thread Starter
velpan

(@velpan)

It works fine! Thank you.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer