Php 获取管理员可以更改的状态

Php 获取管理员可以更改的状态,php,wordpress,woocommerce,Php,Wordpress,Woocommerce,我正在构建一个自定义订单页面,我需要从WooCommerce订单页面重新创建一个批量操作下拉列表wc\u get\u order\u statuses()为我提供了一个包含所有WooCommerce订单状态的数组,但这并不是我所需要的 Array ( [wc-pending] => Pending payment [wc-processing] => Processing [wc-on-hold] => On hold [wc-completed

我正在构建一个自定义订单页面,我需要从WooCommerce订单页面重新创建一个批量操作下拉列表
wc\u get\u order\u statuses()
为我提供了一个包含所有WooCommerce订单状态的数组,但这并不是我所需要的

Array (
    [wc-pending] => Pending payment
    [wc-processing] => Processing
    [wc-on-hold] => On hold
    [wc-completed] => Completed
    [wc-cancelled] => Cancelled
    [wc-refunded] => Refunded
    [wc-failed] => Failed
    [wc-customer-edit] => Customer Edit
)

它具有
失败
退款
取消
订单状态,这些状态在某些事件中自动应用。是否有一种方法可以获取所有允许管理员在WooCommerce中设置的订单状态(不包括自动订单状态)?

我不认为现在就有此功能,我能想到的唯一解决方案是手动(在代码中指定)从
wc\u get\u order\u status()中筛选您不需要的状态
函数的输出我不认为现在就有这样的函数,我能想到的唯一解决方案是手动(在代码中指定)从
wc\u get\u order\u statuses()函数的输出中过滤不需要的状态。
函数的输出