[英]WooCommerce how to get the list of my account items?
I am trying to get all the menu items under the WooCommerce My account but it returns only the default items.我正在尝试获取 WooCommerce 我的帐户下的所有菜单项,但它仅返回默认项。
This function 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" }
这个 function
wc_get_account_menu_items()
返回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" }
But this does not have subscriptions or an appointment menu.但这没有订阅或约会菜单。
I believe these were added through woocommerce_account_menu_items
filter.我相信这些是通过
woocommerce_account_menu_items
过滤器添加的。 But how can I have the current list of current menus with links?但是我怎样才能获得带有链接的当前菜单的当前列表?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.