Skip to content

Commit

Permalink
Check for empty price.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jan 30, 2024
1 parent e3ab6b4 commit 8bb7252
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions classes/AdminProjectPostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,17 @@ public function custom_columns( $column, $post_id ) {

break;
case 'orbis_project_price':
$price = new Money( $orbis_project->get_price(), 'EUR' );
echo esc_html( $price->format_i18n() );
$value = $orbis_project->get_price();

if ( null === $value ) {
echo '';
}

if ( null !== $value ) {
$price = new Money( $value, 'EUR' );

echo esc_html( $price->format_i18n() );
}

break;
case 'orbis_project_time':
Expand Down

0 comments on commit 8bb7252

Please sign in to comment.