WooCommerce 如何获取我的帐户项目列表?

WooCommerce how to get the list of my account items?

我正在尝试获取 WooCommerce 我的帐户下的所有菜单项,但它 returns 只有默认项。

这个函数wc_get_account_menu_items()returns array(6) { ["orders"]=> string(6) "orders" ["downloads"]=> string(9) "downloads" ["edit-address"]=> string(12) "edit-address" ["payment-methods"]=> string(15) "payment-methods" ["edit-account"]=> string(12) "edit-account" ["customer-logout"]=> string(15) "customer-logout" }

但这没有订阅或约会菜单。

我相信这些是通过 woocommerce_account_menu_items 过滤器添加的。但是我怎样才能获得带有链接的当前菜单的当前列表?

echo '<pre>wc_get_account_menu_items:-';
print_r( wc_get_account_menu_items());
echo '</pre>';

打印所有菜单。