1
私はこれを使用して「特別ページ」新しいメニューアイテムを作成することができました:WooCommerceカスタムリンクとマイアカウントページのカスタムメニュー項目
add_filter('woocommerce_account_menu_items' , 'kc_menu_panel_nav');
function kc_menu_panel_nav() {
$items = array(
'dashboard' => __('Dashboard', 'woocommerce'),
'orders' => __('Orders', 'woocommerce'),
'downloads' => __('Downloads', 'woocommerce'),
'edit-address' => __('Addresses', 'woocommerce'),
'payment-methods' => __('Payment Methods', 'woocommerce'),
'edit-account' => __('Account Details', 'woocommerce'),
'special-page' => __('Special Page', 'woocommerce'), // My custom tab here
'customer-logout' => __('Logout', 'woocommerce'),
);
return $items;
}
それは.How私のアカウント/特殊ページにリダイレクト特別ページリンク用のカスタムリンクを作成しますか?
は、このを見ているよう、それはたとえば、ページのスラッグ名です:https://github.com/woothemes/woocommerce/wiki/2.6-Tabbedを-Myアカウントページ – LoicTheAztec
あなたはそれを確認することができます:https://gist.github.com/duroe5698/e89aa6c18b3e02e7a050e36eeed02664 –
これはまた役に立ちます:https://gist.github.com/claudiosanches/a79f4e3992ae96cb821d3b357834a005#file- custom-my-account-endpoint-php –