I am adding product category as a new child menu in main parent
“Categories” menu at front.but they are not sorted.When i am adding new child menu its gets a last position in menu. But i want to sort them and display in alphabetically order.
For adding new child used wp_update_nav_menu_item method and getting all menus using wp_get_nav_menu_items method.
Any one can help me. I am working on this last 8 days
Read more here:: Sorting child item of navigation menu using code in wordpress