Advertisement
wpgenie

auction lots code snippet

Jun 13th, 2025 (edited)
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. add_action( 'template_redirect', 'wpgenie_add_bid_button_template_redirect' );
  2.  
  3. function wpgenie_add_bid_button_template_redirect() {
  4.     if ( is_page('auction-lot-1') ) {
  5.         add_action( 'woocommerce_after_shop_loop_item_title', 'wpgenie_add_bid_button',50 );
  6.     }
  7. }
  8.  
  9.  
  10. function wpgenie_add_bid_button(){
  11.  
  12.     global $product, $post;
  13.  
  14.     if ( $product->get_type() !== 'auction' ){
  15.         return;
  16.     }
  17.     wc_get_template( 'single-product/auction-bid-form.php' );
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement