Documentation

Add Delivery Date And Time To WooCommerce PDF Invoices & Packing Slips By WP Overnight

To add the delivery date and time from WooCommerce Delivery Slots to your invoices and packing slips generated by the “WooCommerce PDF Invoices & Packing Slips” by WP Overnight, you can use the following code.

To use the code, add it to your child theme’s functions.php file.

/**
 * Add Date and Time Slots to Invoices
 */
function iconic_wpo_wcpdf_delivery_date( $template_type, $order ) {
	if ( $template_type !== 'packing-slip' ) {
		return;
	}
	
	$date      = $order->get_meta( 'jckwds_date' );
	$time_slot = $order->get_meta( 'jckwds_timeslot' );
	
	?>
	<tr class="iconic-delivery-date">
		<th><?php _e( 'Order Slot:', 'iconic' ); ?></th>
		<td>
			<?php echo $date; ?><br>
			<?php echo $time_slot; ?>
		</td>
	</tr>
	<?php
}

add_action( 'wpo_wcpdf_after_order_data', 'iconic_wpo_wcpdf_delivery_date', 10, 2 );

Are you using WooCommerce Delivery Slots yet?

Start your 14-day free trial right now and get instant access to the features described in this article.

or learn more

Was this helpful?

Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.

WooCommerce Delivery Slots

WooCommerce Delivery Slots

Not got the plugin yet? Get instant access right now, free for 14 days.

or learn more

Still need help?

If you haven't found what you're looking for in our documentation, please contact support.

Get Support