wpgenie icon

auction lots code snippet

wpgenie | PRO | 06/13/25 01:57:38 PM UTC (Edited) | 0 ⭐ | 11198 👁️ | Never ⏰ | []
PHP |

480 B

|

None

|

0 👍

/

0 👎

add_action( 'template_redirect', 'wpgenie_add_bid_button_template_redirect' );
 
function wpgenie_add_bid_button_template_redirect() {
    if ( is_page('auction-lot-1') ) {
        add_action( 'woocommerce_after_shop_loop_item_title', 'wpgenie_add_bid_button',50 );
    }
}
 
 
function wpgenie_add_bid_button(){
 
    global $product, $post;
 
    if ( $product->get_type() !== 'auction' ){
        return;
    }
    wc_get_template( 'single-product/auction-bid-form.php' );
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎