Simple Membership Plugin › Forums › Simple Membership Plugin › Simple WP Membership – WooCommerce
- This topic has 8 replies, 3 voices, and was last updated 9 years, 8 months ago by
Iris.
-
AuthorPosts
-
March 2, 2015 at 1:14 am #1115
jspirko
ParticipantHi Folks,
Looking to see if someone can help me out. I just installed the SM WP plugin v2.1.1 and seems to be working fine. I’m trying to protect the main Shop page generated from WooCommerce, but not having any luck. Here is some basic site info.
Wordpress: v4.1.1
Theme Installed: Minamaze v1.1.4
Simple WP Membership: v2.1.1
WooCommerce: v2.3.5Here is an example of Simple WP Membership working:
wp.koyamadojo.com/hdrjj-membersHere is the page I want to protect:
wp.koyamadojo.com/shopAnyone successfully using Simple WP Membership to lockdown WooCommerce?
March 2, 2015 at 6:09 am #1119admin
KeymasterPlease do a test for me.
Edit the following file from the simple membership plugin folder:
classes/class.simple-wp-membership.phpFind the following line of code in this file:
add_filter('the_content', array(&$this, 'filter_content'));Change it to the following:
add_filter('the_content', array(&$this, 'filter_content'), 11);Let me know how it goes after that.
March 3, 2015 at 4:23 am #1139jspirko
ParticipantThanks for the quick reply. I made the change in the classes/class.simple-wp-membership.php file.
No change in page behavior. I’m still able to view the Shop page (http://wp.koyamadojo.com/shop/) without being logged in.
In the Shop page options I have page protection enabled, “Yes, Protect this content.”. I also have two membership levels defined. Both are selected to be able to view content.
March 7, 2015 at 11:58 pm #1185jspirko
ParticipantAny suggestions?
Here is the section of
classes/class.simple-wp-membership.phpwhere I modified the lines requested:
add_action('init', array(&$this, 'init')); /*add_filter('the_content', array(&$this, 'filter_content'));*/ add_filter('the_content', array(&$this, 'filter_content'), 11); add_filter('widget_text', 'do_shortcode');March 8, 2015 at 1:00 am #1187admin
KeymasterWe just looked at the WooCommerce code and it looks like they intentionally don’t execute the standard “the_content” filter on that shop page. Not sure why. They also don’t define any filter for that page that we can use to hook and protect the page. So I can’t see how we can protect that page from our plugin (since they have no filter available).
March 8, 2015 at 4:50 pm #1189jspirko
ParticipantI will submit a support request with WooCommerce detailing what you found.
Thanks for the follow up. Much appreciated.
September 22, 2016 at 9:48 am #8402Iris
ParticipantThis has been 1,5 year back and I am having the same issue with products and categories. The ones that should be hidden for non-members, are still visible.
Did you find a solution for your problem jspirko?September 26, 2016 at 8:51 pm #8429jspirko
ParticipantUnfortunately, no. I could not make this work. I ended up purchasing WooCommerce Membership. It does everything I need.
September 28, 2016 at 8:47 am #8435Iris
ParticipantThank you for your reply! It’s a pity it doesn’t work with Woocommerce. Membership Pro is for now too expensive for me yet, maybe in the future. But I found some kind of workaround with the plugin Groups (https://wordpress.org/plugins/groups/) and a seperate Woocommerce installation just for members only.
So people subscribe with Simple Membership, become a member (and on my email list with an MailChimp integration). When subscribed, they are also member automatically of the Group ‘Registered’ and the Groups plugin makes it possible that only members of that group can see certain products. This site was helpful, but uses Membership Pro to tie Groups to Members:
https://www.sellwithwp.com/how-do-i-restrict-products-to-members-only/
Because Woocommerce adds all customers to the Registered group, I couldn’t use my initial shop without Membership Pro, because then every customer would have excess to all products. So I made a seperate shop just for members. Bit complicated, but for now it seems to work (still building it). I was lucky that I had a seperate installation of WP with Woocommerce for the shop, my blog uses another WP installation, so I installed Woocommerce on that installation as well to make the membership shop.
Yes I like puzzling 😉
-
AuthorPosts
- You must be logged in to reply to this topic.