Skip to content

Commit

Permalink
[#39] Fixing the logic on the auction featured image
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-schmidt-viget committed Dec 21, 2023
1 parent 0bfacea commit f6911d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client-mu-plugins/goodbids/src/classes/Auctions/Auctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,12 @@ function ( string $html, int $post_id ) {
return $html;
}

// If the auction has a featured image
if ( has_post_thumbnail( $post_id ) ) {
return $html;
}

// Default to the WooCommerce featured image or WooCommerce default image
$reward_id = $this->get_reward_product_id( $post_id );
$product = wc_get_product( $reward_id );

Expand Down

0 comments on commit f6911d5

Please sign in to comment.