woocommerce用户中心菜单修改/添加自定链接
- WooCommerce
- 2021-12-20
- 74热度
- 0评论
//woocommerce用户中心菜单 add_filter( 'woocommerce_account_menu_items' , 'kc_menu_panel_nav' ); function kc_menu_panel_nav() { $items = array( 'dashboard' => __( 'Dashboard', 'woocommerce' ), 'orders' => __( 'Orders', 'woocommerce' ), 'wishlist' => __( '我的收藏', 'Wishlist' ), // 自定义 'edit-address' => __( 'Addresses', 'woocommerce' ), 'edit-account' => __( '账户信息', 'woocommerce' ), 'customer-logout' => __( '退出账户', 'woocommerce' ), ); return $items; }
说明:
Here your page slug name is required,your code:
'special-page' =>
it's your page slug name For example like
'about-us' => __( 'My Page', 'woocommerce' ), // My custom tab here