I recently had a client who needed to link to content using the “Memberships” plugin by WooCommerce. The issue here is that there is really no way to link to “membership only” content in an easy fashion. Not the products, but actual content. So, when you add pages or posts to the website and then attach them to be viewed only by certain members via the Memberships plugin, your members can link to their content from their My Account page.
So, I hired a guy on Fiverr.com ( https://www.fiverr.com/sukhchain_singh ), and he did the work for me.
There were a number of people who own this plugin who wanted the file he manipulated, so here it is as a .txt file since I can’t upload .php files:
I added the file to a woocommerce file in my child theme.
I did find one small glitch, but worth passing over to get the functionality. When the membership that was purchased displays on the My Account page, the link will go to whatever page you add to that membership last. So if you have several pages that are a part of the membership, remember to add the page you want to link to last.
Let me know if anyone has any questions, but please don’t ask about the code, I didn’t write it! 🙂
Alessandro says
Hi,
I want to call in my account section the user table of my membership (my-membership.php of the theme child folder), but not work.
The error is “Invalid argument supplied for foreach() in ../wp-content/themes/north-wp-child/woocommerce/myaccount/my-memberships.php on line 54”.
The theme is North ecommerce.
Thanks in advance.