Duplicated "/" after store name on URL
-
Hi! I’m using WP 4.1.1 and WC 2.3.5 and your plugin is great! However i just noticed that my product URL always have a double “/” after the store name. Ex.:
https://www.domain.com/store//shoes/dolce-gabanna-black-shoeThis only happens with main categories. If i add the product to a subcategory, the URL does not show the double “/”. Ex.:
https://www.domain.com/store/shoes/men-shoes/dolce-gabanna-black-shoeOf course the browser fixes the URL removing the double “/” but as i hover my mouse on the products i can see the URL has the double “/”.
I already checked the class-wcbp.php file and if i remove the “/” on $wcbp_base the URL gets fixed.
Ex.:
Your code:return home_url( $wcbp_base . '/' . $the_ancestor_slug . '/' . $main_term->slug . '/' . $post->post_name );
My code:
return home_url( $wcbp_base . '' . $the_ancestor_slug . '/' . $main_term->slug . '/' . $post->post_name );
Is this “fix” OK? Maybe you need to update the plugin? I started using the plugin several weeks ago and didn’t noticed this issue. Since then i had maybe one or two WP and WC updates.
I also tested this on other domains and themes and its the same. It doesn’t really matter the permalink settings i have, because if i just choose post name on common, store with category on product permalink and add “store” to shop permalinks the issue is there.
Please help! Thanks in advance
https://www.ads-software.com/plugins/woocommerce-breadcrumb-permalinks/
- The topic ‘Duplicated "/" after store name on URL’ is closed to new replies.