Add Site to My-Account Page

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 3 reply threads
  • Author
    Posts
    • #72219
      thiemann.k
      Participant

      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

    • #72425
      WCFM Forum
      Member

      HI,

      i would like to add any Site’s to the My-Account Page

      – Sorry, what does this means?

      Thank You

    • #72732
      thiemann.k
      Participant

      under account details on the right side, new links should be created

      https://ibb.co/5rZkkhS

      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;
       
      }
    • #72942
      WCFM Forum
      Member

      Great … thanks for the update!

Viewing 3 reply threads
  • You must be logged in to reply to this topic.