WooCommerce is the most popular shopping cart for WordPress. BuddyPress is powerful community plugin for WordPress that takes your site beyond a blog and gives it social networking features. Both plugins are now owned by the same company, Automattic. But if you’ve ever tried installing them both on the same site, you’ve probably realized that you are left with two completely separate “My Account” areas for users to manage their account! This is very confusing.
I started off by labeling the WooCommerce area as “My Account” and the BuddyPress area as “My Profile” on my menu bar. How did this work? Not very well. Users can do some actions in either area (e.g. change email, reset password), some only in the BuddyPress profile area (e.g. activity streams, groups, notifications), and some only under the WooCommerce account area (e.g. order history, change address). Not a good user experience.
Unfortunately, all of the existing integration solutions that I found online were designed to work before WooCommerce updated to a tabbed My Account interface in version 2.6. I even tried purchasing the integration from ThemeKraft, but it failed to display almost all of the WooCommerce My Account tabs in BuddyPress. Their support was awesome and they quickly gave me a refund.
So I stayed up most of the night and coded my own plugin to integrate the WooCommerce My Account area into BuddyPress. I put my code up on GitHub if you’re interested. It’s not an all-around comprehensive solution that is going to work right out of the box for everyone, but it’s a rough start that seems to be getting the job done for me. Here are the aspects that it addresses:
- Add the WooCommerce My Account tab and subtabs to the BuddyPress profile navigation
- Override WooCommerce endpoints to point them to the pages on the BuddyPress profile
- Override the WooCommerce is_add_payment_method_page function to allow the Add Payment Page to appear outside of the WooCommerce My Account area
- Point the WooCommerce “Edit Account” URL to the BuddyPress “Account Settings” page
If anyone has ideas for improving and adding to this approach, feel free to submit a pull request on GitHub.
View the BuddyPress WooCommerce My Account Integration on GitHub.
***** Update 2/4/2017 *****
I just received a note today from ThemeKraft that said they have recently been working on their integration: “We have finally started to rewrite the plugin as you suggested. It was definitely needed to rewrite it after all the time WooCommerce has changed rapidly. There are options for all the my account pages now and the best we want to make it a free plugin on WordPress.org with a free/ pro business model but keep the development on github.” This is definitely worth checking out!