Skip to content

Commit

Permalink
Update abstract-wcpdf-order-document.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Jun 25, 2024
1 parent d41feac commit 555827b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions includes/documents/abstract-wcpdf-order-document.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down Expand Up @@ -899,6 +899,9 @@ public function header_logo(): void {
$img_element = sprintf( '<img src="%1$s" alt="%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' );
}
}

Expand Down

0 comments on commit 555827b

Please sign in to comment.