diff --git a/includes/class-wcpdf-main.php b/includes/class-wcpdf-main.php index d13ce8b0d..4bc2a40d8 100644 --- a/includes/class-wcpdf-main.php +++ b/includes/class-wcpdf-main.php @@ -1599,11 +1599,12 @@ public function display_due_date( string $document_type, $order ): void { return; } - $due_date = apply_filters( "wpo_wcpdf_{$document->slug}_due_date_display", date( wcpdf_date_format( $this, 'due_date' ), $due_date_timestamp ), $due_date_timestamp, $order, $document_type ); + $due_date = apply_filters( "wpo_wcpdf_{$document->slug}_due_date_display", date( wcpdf_date_format( $this, 'due_date' ), $due_date_timestamp ), $due_date_timestamp, $order, $document_type ); + $due_date_title = is_callable( array( $document, 'get_due_date_title' ) ) ? $document->get_due_date_title() : __( 'Due Date:', 'woocommerce-pdf-invoices-packing-slips' ); if ( ! empty( $due_date ) ) { echo ' - ', $document->get_due_date_title(), ' + ', $due_date_title, ' ', $due_date, ' '; }