Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- 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 );
Advertisement