woocommerce_cancel_unpaid_orders_interval_minutes

woocommerce_cancel_unpaid_orders_interval_minutes

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_cancel_unpaid_orders_interval_minutes') is found 3 times:

  • /includes/class-wc-install.php line 806
    			 * Determines the interval at which to cancel unpaid orders in minutes.
    			 *
    			 * @since 5.1.0
    			 */
    			$cancel_unpaid_interval = apply_filters( 'woocommerce_cancel_unpaid_orders_interval_minutes', absint( $held_duration ) );
    			wp_schedule_single_event( time() + ( absint( $cancel_unpaid_interval ) * 60 ), 'woocommerce_cancel_unpaid_orders' );
    		}
    
    		// Delay the first run of `woocommerce_cleanup_personal_data` by 10 seconds
    		// so it doesn't occur in the same request. WooCommerce Admin also schedules
    		// a daily cron that gets lost due to a race condition. WC_Privacy's background
    
  • /includes/wc-formatting-functions.php line 1196
     
    	wp_clear_scheduled_hook( 'woocommerce_cancel_unpaid_orders' );
    
    	if ( '' !== $value ) {
    		$cancel_unpaid_interval = apply_filters( 'woocommerce_cancel_unpaid_orders_interval_minutes', absint( $value ) );
    		wp_schedule_single_event( time() + ( absint( $cancel_unpaid_interval ) * 60 ), 'woocommerce_cancel_unpaid_orders' );
    	}
    
    	return $value;
    }
    add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_hold_stock_minutes', 'wc_format_option_hold_stock_minutes', 10, 3 );
    
  • /includes/wc-order-functions.php line 1032

    // Re-schedule the event before cancelling orders
    // this way in case of a DB timeout or (plugin) crash the event is always scheduled for retry.
    wp_clear_scheduled_hook( ‘woocommerce_cancel_unpaid_orders’ );
    $cancel_unpaid_interval = apply_filters( ‘woocommerce_cancel_unpaid_orders_interval_minutes’, absint( $held_duration ) );
    wp_schedule_single_event( time() + ( absint( $cancel_unpaid_interval ) * 60 ), ‘woocommerce_cancel_unpaid_orders’ );

    if ( $held_duration < 1 || 'yes' !== get_option( 'woocommerce_manage_stock' ) ) { return; } [/php]