robertstaddon / buddypress-woocommerce

Move WooCommerce My Account area to BuddyPress profile
22 stars 4 forks source link

Buddypress account URL is filterable but you don't allow for this #6

Closed Peter-HVD closed 4 years ago

Peter-HVD commented 4 years ago

In lines 61 & 157 you hard-code the user's account URL, but BP allows for the exact URL to be filterable.

You should use the bp_loggedin_user_domain() function and change these lines to:

61: return bp_loggedin_user_domain() . "settings";

and

157: $base_path = bp_loggedin_user_domain() . "account/";

Cheers

robertstaddon commented 4 years ago

Thank you for sharing this, @Peter-HVD!

I just made a commit that should fix this: https://github.com/robertstaddon/buddypress-woocommerce/commit/484bd9192dd468f879d9dcd15c458ba627b6573b