SHARE
TWEET

custom_get_increase_bid_value

wpgenie Mar 13th, 2018 (edited) 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter( 'woocommerce_simple_auctions_get_increase_bid_value', 'custom_get_increase_bid_value', 10 , 2 );
  2.  
  3. function custom_get_increase_bid_value( $auction_bid_increment, $product){
  4.  
  5.     $bid_value = $product->get_curent_bid();
  6.  
  7.     switch ($bid_value) {
  8.         case $bid_value <= 25:
  9.             $auction_bid_increment = 2;
  10.             break;
  11.         case ( $bid_value > 25 && $bid_value <= 80 ):
  12.             $auction_bid_increment = 5;
  13.             break;
  14.         case ( $bid_value > 80 && $bid_value <= 230 ):
  15.             $auction_bid_increment = 10;
  16.             break;
  17.         case ( $bid_value > 230 && $bid_value <= 750 ):
  18.             $auction_bid_increment = 20;
  19.             break;
  20.         case ( $bid_value > 750 && $bid_value <= 2000 ):
  21.             $auction_bid_increment = 40;
  22.             break;
  23.         case ( $bid_value > 20000 && $bid_value <= 6000 ):
  24.             $auction_bid_increment = 80;
  25.             break;
  26.         case ( $bid_value > 6000 && $bid_value <= 20000 ):
  27.             $auction_bid_increment = 200;
  28.         break;
  29.         case ( $bid_value > 20000 && $bid_value <= 50000 ):
  30.             $auction_bid_increment = 500;
  31.         break;
  32.         case ( $bid_value > 50000 ):
  33.             $auction_bid_increment = 10000;
  34.             break;         
  35.     }
  36.  
  37.     return $auction_bid_increment;
  38.  
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top