wpgenie

auctions relist for n minutes

Jul 1st, 2026
11,019
1
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 1 0
  1. add_filter( 'woocommerce_simple_auctions_automatic_relist_check_time', 'custom_woocommerce_simple_auctions_automatic_relist_check_time', 10, 4 );
  2. function custom_woocommerce_simple_auctions_automatic_relist_check_time( $data, $auction_dates_to, $relist_delay, $product ) {
  3.     return current_time( 'timestamp' ) > ( strtotime( $auction_dates_to ) + ( intval( $relist_delay ) * 60 ) );
  4. }
  5. add_filter( 'woocommerce_simple_auctions_relist_auction_to_time', 'custom_woocommerce_simple_auctions_relist_auction_to_time', 10, 2 );
  6. function custom_woocommerce_simple_auctions_relist_auction_to_time( $to_time, $product ) {
  7.     $relist_duration = $product->get_auction_relist_duration();
  8.     $to_time         = date( 'Y-m-d H:i', current_time( 'timestamp' ) + ( $relist_duration * 60 ) );
  9.     return $to_time;
  10. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment