Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Add Site to My-Account Page
- This topic has 3 replies, 2 voices, and was last updated 5 years, 5 months ago by WCFM Forum.
Viewing 3 reply threads
- AuthorPosts
- July 13, 2019 at 6:09 am #72219thiemann.kParticipant
Hey Community,
i would like to add any Site’s to the My-Account Page. how does it work? quite simply with a snippet?!?
Unfortunately, I do not remember how that works. … but sometimes you do not see the forest for the trees.
Ciao, Karsten
- July 14, 2019 at 7:33 am #72425WCFM ForumMember
HI,
i would like to add any Site’s to the My-Account Page
– Sorry, what does this means?
Thank You
- July 17, 2019 at 4:23 am #72732thiemann.kParticipant
under account details on the right side, new links should be created
I have solved this with this code
add_filter ( 'woocommerce_account_menu_items', 'misha_one_more_link' ); function misha_one_more_link( $menu_links ){ // we will hook "anyuniquetext123" later $new = array( 'anyuniquetext123' => 'YOUR TITLE' ); // or in case you need 2 links // $new = array( 'link1' => 'Link 1', 'link2' => 'Link 2' ); // array_slice() is good when you want to add an element between the other ones $menu_links = array_slice( $menu_links, 0, 1, true ) + $new + array_slice( $menu_links, 1, NULL, true ); return $menu_links; } add_filter( 'woocommerce_get_endpoint_url', 'misha_hook_endpoint', 10, 4 ); function misha_hook_endpoint( $url, $endpoint, $value, $permalink ){ if( $endpoint === 'anyuniquetext123' ) { // ok, here is the place for your custom URL, it could be external $url = 'YOUR URL'; } return $url; }
- July 18, 2019 at 12:06 pm #72942WCFM ForumMember
Great … thanks for the update!
- AuthorPosts
Viewing 3 reply threads
- You must be logged in to reply to this topic.