Search Knowledge Base by Keyword
Compatibility with WoodMart Theme “My Account” widget
This article belongs to our plugin : WooCommerce Customize My account Pro
Put below given code snippet in your woodmart child theme’s fuctions.php to make groups, links , added endpoints compatible with header My Account Menu of Woomart theme.
// **********************************************************************// // ! My account menu // **********************************************************************// function woodmart_get_my_account_menu() { $user_info = get_userdata( get_current_user_id() ); $user_roles = $user_info->roles; $out = '<ul class="wd-sub-menu' . woodmart_get_old_classes( ' sub-menu' ) . '">'; foreach ( wc_get_account_menu_items() as $endpoint => $label ) { $out .= '<li class="' . wc_get_account_menu_item_classes( $endpoint ) . '"><a href="' . esc_url( wc_get_account_endpoint_url( $endpoint ) ) . '"><span>' . esc_html( $label ) . '</span></a></li>'; } $out .= '</ul>'; return apply_filters('woodmart_override_heading_my_account_menu',$out); }
After that you will start see groups , endpoints , links showing in same manner as it shows on my account navigation menu.
It will require WooCommerce Customize My Account Pro version 2.1.12 or higher.