wc_sanitize_order_id( int $order_id )
Sanitize order id removing unwanted characters.
Description Description
E.g Users can sometimes try to track an order id using # with no success. This function will fix this.
Parameters Parameters
- $order_id
-
(Required) Order ID.
Source Source
File: includes/wc-order-functions.php
function wc_sanitize_order_id( $order_id ) { return (int) filter_var( $order_id, FILTER_SANITIZE_NUMBER_INT ); }
Changelog Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |