wpgenie

remove current bid and bid now button from auction archive

Oct 12th, 2026
33,841
1
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 1 0
  1. /*
  2. remove current bid / starting bid and bid now button from auction archive / loop template
  3.  
  4. code goes to child-theme/functsion.php
  5. */
  6.  
  7. function wpgenie_remove_auction_bid_button_loop( $html, $product ) {
  8.     if ( method_exists( $product, 'is_type' ) && $product->is_type( 'auction' ) ) {
  9.         return '';
  10.     }
  11.     return $html;
  12. }
  13. add_filter( 'woocommerce_loop_add_to_cart_link', 'wpgenie_remove_auction_bid_button_loop', 10, 2 );
  14.  
  15.  
  16. function wpgenie_remove_auction_price_loop( $price, $product ) {
  17.     if ( is_admin() ) {
  18.         return $price;
  19.     }
  20.     if ( method_exists( $product, 'is_type' ) && $product->is_type( 'auction' ) && ! is_product() ) {
  21.         return '';
  22.     }
  23.     return $price;
  24. }
  25. add_filter( 'woocommerce_get_price_html', 'wpgenie_remove_auction_price_loop', 10, 2 );
Advertisement