wc_get_template new template does not showing up

plugin_dir_path( FILE ) will return the current directory. Not sure where you call this q343_get_template() function if it’s on a subdirectory then plugin_dir_path( FILE ) is returning that subdirectory path. From WordPress Code Reference https://developer.wordpress.org/reference/functions/plugin_dir_path/ The “plugin” part of the name is misleading – it can be used for any file, and will not return … Read more

Add_rewrite_endpoint doesn’t work with post name permalink structure

I would avoid using add_rewrite_endpoint() directly to register account page endpoints in WooCommerce. WooCommerce has a filter that you can use that make sure everything else works properly, like the endpoint title filter and calls to is_wc_endpoint_url(). So add the endpoint with the woocommerce_get_query_vars filter: add_filter( ‘woocommerce_get_query_vars’, function( $query_vars ) { $query_vars[‘conversations’] = ‘conversations’; return … Read more