From 555827b53837b5a15a0d89ee3bbc412cfb12812f Mon Sep 17 00:00:00 2001 From: Alexandre Faustino Date: Tue, 25 Jun 2024 10:10:56 +0100 Subject: [PATCH] Update abstract-wcpdf-order-document.php --- includes/documents/abstract-wcpdf-order-document.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/documents/abstract-wcpdf-order-document.php b/includes/documents/abstract-wcpdf-order-document.php index 91e9e5233..6889ea46d 100644 --- a/includes/documents/abstract-wcpdf-order-document.php +++ b/includes/documents/abstract-wcpdf-order-document.php @@ -823,14 +823,14 @@ public function get_header_logo_id() { $header_logo_id = false; if ( ! empty( $this->settings['header_logo'] ) ) { - $header_logo_id = absint( $this->get_settings_text( 'header_logo', '', false ) ); + $header_logo_id = absint( $this->get_settings_text( 'header_logo', 0, false ) ); if ( 0 === $header_logo_id ) { $header_logo_id = false; } } - return apply_filters( 'wpo_wcpdf_header_logo_id', absint( $header_logo_id ), $this ); + return apply_filters( 'wpo_wcpdf_header_logo_id', $header_logo_id, $this ); } /** @@ -899,6 +899,9 @@ public function header_logo(): void { $img_element = sprintf( '%2$s', esc_attr( $image_src ), esc_attr( $company ) ); echo apply_filters( 'wpo_wcpdf_header_logo_img_element', $img_element, $attachment, $this ); + + } else { + wcpdf_log_error( 'Header logo not set.', 'critical' ); } }