Hello, I need support regarding connecting my Woocommerce short-code endpoints via a tab I created.
In the profile section, I include two custom tabs using the plugin BuddyPress Custom Tab Creator. I labeled the new tabs:
For the ‘Account’ tab, I created “two” sub tabs. The sub tabs which are labeled:
1. My Account
2. Account Settings
In the “My Account” sub tab, I also included the short-code for the Woocommerce ‘my account’ settings – see screenshot: https://d.pr/i/3muHax. However, the endpoint urls are not connected properly so it is not working on my end when I click Orders, Addresses, etc.
I reached out to Woocommerce for support regarding connecting my endpoints correctly, however, I was told that they were confident I would be able to receive the proper support by contacting the BuddyPress Custom Tab Creator support team. There point was that without the tabs, the wooocommerce short code would work fine.
Can you please provide me with steps on how to properly configure my endpoints within the profile?
Appreciate your help.
Welcome to BuddyDev support forums.
The problem is WooCommerce uses the end point urls relative to your “myaccount” page permalink.
It does not matter where you put this shortcode, the end point urls are always related to the default WooCommerce my account page. This is due to the way the ‘wc_get_account_endpoint_url’ works. It takes the permalink of ‘myaccount’ page(which is set in your WooCommerce settings) and prepares end point urls relative to them.
You can check it by putting the shortcode in a normal page or post instead of the profile tab.
The solution is to filter the specific end point urls to force it point to current page/relative to current page. Profile tabs does not know what kind of content is being used and can not filter this.
In other words, even if you use the shortcode inside the tab, Profile tab will not be able to change the url for WooCommerec links as they are handles by woo.
We have a specific plugin to solve this. you can use BuddyCommerce. The plugin is aware of WooCommerec and the related urls and knows how to filter them.
Thank you very much for your quick response. I tried the plugin you suggested and I understand the logic of how this works in relation to woocommerce, however, using the plugin requires for me to use the layout as provided by the BuddyCommerce plugin, rather than what I really want: The woocommerce shortcode within the sub tab.
Is it possible to use the BuddyCommerce plugin to solve my issue while keeping the same layout with the Woocommerce Shortcode?
Or will this require some sort of custom development to achieve on my end?
Thank you for your help and time.
There is no our of the box solution to have the WooCommerce tabs to display on the user profile without custom code. You may show the initial state using the shortcode but unless you have someone develop it for you, there will be 2 issues:-
1. All the links will point to original woocommerce my account page. It can be filtered via code
2. The form handling(saving card etc), needs to be re-done. Displaying information is a bit easy.
We faced these issues while creating BuddyCommerce, so noting down.
You must be logged in to reply to this topic.