wpgenie

max single bid limit

May 4th, 2016
334
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action('woocommerce_simple_auctions_before_place_bid' , 'custom_max_single_bid_limit' ,10 , 3);
  2.  
  3. function custom_max_single_bid_limit($product_id, $bid,$product_data) {
  4. global $product_data;
  5.  
  6.  
  7. if (($bid - $product_data->auction_current_bid) >= '100') {
  8.  
  9. wc_add_notice(sprintf('Your bid is bigger than max single bid amount', 'wc_simple_auctions'),'error');
  10. $product_data = FALSE;
  11. return false;
  12.  
  13.  
  14. }
  15.  
  16.  
  17. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×