wpgenie

show number of bids

Feb 13th, 2018
859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. add_action('woocommerce_before_bid_form', 'custom_number_of_bids_text', 5);
  2. function custom_number_of_bids_text(){
  3.     global $product;
  4.     $bid_count = intval($product->get_auction_bid_count());
  5.     if(absint($bid_count) > 0 ){
  6.         echo "<p class='number-of-bids-text'>";
  7.         printf(__('Bids: %d' , 'wc_simple_auctions'),$bid_count );
  8.         echo "</p>";
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment