Automattic\WooCommerce\Utilities
OrderUtil::remove_status_prefix
Removes the 'wc-' prefix from status.
Method of the class: OrderUtil{}
No Hooks.
Returns
String. The status without the prefix.
Usage
$result = OrderUtil::remove_status_prefix( $status ): string;
- $status(string) (required)
- The status to remove the prefix from.
Changelog
| Since 9.2.0 | Introduced. |
OrderUtil::remove_status_prefix() OrderUtil::remove status prefix code WC 10.3.5
public static function remove_status_prefix( string $status ): string {
if ( strpos( $status, 'wc-' ) === 0 ) {
$status = substr( $status, 3 );
}
return $status;
}