remove current bid and bid now button from au...
- /*
- remove current bid / starting bid and bid now button from auction archive / loop template
- code goes to child-theme/functsion.php
- */
- function wpgenie_remove_auction_bid_button_loop( $html, $product ) {
- if ( method_exists( $product, 'is_type' ) && $product->is_type( 'auction' ) ) {
- return '';
- }
- return $html;
- }
- add_filter( 'woocommerce_loop_add_to_cart_link', 'wpgenie_remove_auction_bid_button_loop', 10, 2 );
- function wpgenie_remove_auction_price_loop( $price, $product ) {
- if ( is_admin() ) {
- return $price;
- }
- if ( method_exists( $product, 'is_type' ) && $product->is_type( 'auction' ) && ! is_product() ) {
- return '';
- }
- return $price;
- }
- add_filter( 'woocommerce_get_price_html', 'wpgenie_remove_auction_price_loop', 10, 2 );
Pasted 2026-10-12 07:42:29
Short link:
Short link:
Recent Public Pastes