/** * Gets WooCommerce order status name by ID. * * Status ID can be with or without the `wc-` prefix, i.e., `wc-completed` or `completed`. * * @see https://wpcodebook.com/get-woocommerce-order-status-name-by-id/ * @see https://github.com/woocommerce/woocommerce/blob/8.5.2/plugins/woocommerce/includes/wc-order-functions.php#L147 */ $status_id = $order->get_status(); wc_get_order_status_name( $status_id );