title: Get template part in WordPress plugin
body: <p>I'm trying to move a WordPress plugin from my child theme to a custom plugin. The current code is using get_template_part which works on the child theme but not on the custom WordPress plugin.</p>
  <p>I have tried to replace it for &quot;include&quot; but it doesn't work.</p>
  <pre><code>function arbolesplantados_endpoint_content() {
      get_template_part('arbolesplantados'); //I think the problem is here
  }
  
  add_action( 'woocommerce_account_arbolesplantados_endpoint', 'arbolesplantados_endpoint_content' );
  
  
  function arbolesplantados_account_menu_items( $items ) {
  
      $my_items = array(
           'arbolesplantados' =&gt; __( 'Gestionar &amp;aacute;rboles plantados', 'woocommerce' )
      );
  
      $my_items = array_slice( $items, 0, 1, true ) +
           $my_items +
           array_slice( $items, 1, count( $items ), true );
  
  
      return $my_items;
  
  }
  
  add_filter( 'woocommerce_account_menu_items', 'arbolesplantados_account_menu_items');
  </code></pre>
  <p>The previous code is supposed to create a page with the woocommerce menu (my account) on the left and then on the right print the custom form that's inside a file called arbolesplantados.php which is in the root folder of my plugin</p>
  <p><a href="https://i.stack.imgur.com/MV9tO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MV9tO.png" alt="enter image description here" /></a></p>