wpgenie

auction lots code snippet

Jun 13th, 2025 (edited)
12,778
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. /* this is obsolete for Simple Auctions v4.0 */
  2.  
  3. add_action( 'template_redirect', 'wpgenie_add_bid_button_template_redirect' );
  4.  
  5. function wpgenie_add_bid_button_template_redirect() {
  6.     if ( is_page('auction-lot-1') ) {
  7.         add_action( 'woocommerce_after_shop_loop_item_title', 'wpgenie_add_bid_button',50 );
  8.     }
  9. }
  10.  
  11.  
  12. function wpgenie_add_bid_button(){
  13.  
  14.     global $product, $post;
  15.  
  16.     if ( $product->get_type() !== 'auction' ){
  17.         return;
  18.     }
  19.     wc_get_template( 'single-product/auction-bid-form.php' );
  20. }
Advertisement