WordPress at a glance
function is not described

wc_sanitize_order_id() WC 3.1.0

Sanitize order id removing unwanted characters.

E.g Users can sometimes try to track an order id using # with no success. This function will fix this.

No Hooks.

Return

null. Nothing.

Usage

wc_sanitize_order_id( $order_id );
$order_id(int) (required)
Order ID.

Changelog

Since 3.1.0 Introduced.

Code of wc_sanitize_order_id() WC 5.3.0

<?php
function wc_sanitize_order_id( $order_id ) {
	return (int) filter_var( $order_id, FILTER_SANITIZE_NUMBER_INT );
}