Restrict Wordpress product categories for Discourse VIPs

Sorry if this is posted in the wrong place! I was referred here from my discourse dev (Bhanu) but he is out on vacation.

I have a project with a tight deadline (Thursday) where I want to post products on our Wordpress site Virginia.lockerroomaccess.com that are only purchasable by users who have subscribed to VIP on discourse. So the two systems need to communicate with each other in real time. Our forum site is Virginia.forums.lockerroomaccess.com

I also want to make the upsell for VIP more prominent in discourse with more content to the subscribe page and a CTA in the headset.

2 Likes

@Kodie_Critzer Hey Kodie, thanks for reaching out.

It sounds like you want to

  • Restrict visibility of a wordpress shop page to a certain group of users in discourse (i.e. the group users are added to when they’ve purchased a subscription).
  • Add additional text to the subscriptions page in discourse
  • Add a button linking to the subscriptions page to the discourse header

The price range will probably be $400 to $700 USD, depending on your answers.

We need some more info:

  • Which aspect of your needs are critical to your timeline and why? Are you launching something?
  • What are you using to run your shop in wordpress?
  • What text or other content do you want to add to the subscriptions page?

Thank you for the response! We are ready to move forward with this work today if you are!

As for your further questions: we are planning to launch products on thursday and the ability to restrict these products to discourse VIP would be the best scenario for this launch.

We are using woocommerce to run our shop in wordpress.

I will have the additional content for the subscriptions page shortly.

What do you need from me to get the ball rolling on this?

Ok, assuming

  • you have WooCommerce Memberships (which will be necessary here); and

  • that you don’t have Wordpress <> Discourse Single Sign On (either with Wordpress as the provider, or with Discourse as the provider), I can’t seeing this taking a quick look at your site,

then the move here is to add a simple plugin to Wordpress that implements a discourse webhook receiver which updates WC memberships when group memberships in Discourse changes.

WC Memberships are then used to restrict content, see:

The WP Plugin here should just be a single file that implements this structure:

For references on relevant WC Membership hooks see also:

To get this done in the next 48 hours (i.e. by thursday), I think a fair fee is at the upper end of the range I mentioned, so $700 USD. Keep in mind that you’re asking for a very tight turn around with an integration job, which tend to be on the trickier end of things. This one should be relatively ok, but it’s still tight nonetheless.

@fzngagan You’ve currently got your head in Wordpress. Want to take this? Note the timeline

@Canapin @muhlisbc If you’re interested, it’s yours :slight_smile: Note the timeline.

@Kodie_Critzer If any of the people I pinged are interested, they can (will have to) start straight away. You’ll need to:

  1. PM admin credentials to your wordpress instance
  2. Send a deposit to the relevant dev via paypal in the next 24 hours (30%).
2 Likes

Thank you! Im ready to get the ball moving on this if either of you are interested. Just let me know what email I should send credentials to.

1 Like

I’ll PM you. Send me the details there.

@Kodie_Critzer Faiz is working on this with the goal of completing it today. I’ll help him to get it over the line if need be. I’m also here to help you so, let me know if you have any concerns / issues.

1 Like

@Kodie_Critzer @angus getting started now.

@Kodie_Critzer
Update:
Turns out it’s a little tricky. I have to add the webhooks via a plugin for user added/removed from the group.

I’m hoping to meet the deadline as discussed but it might end up taking some more time than discussed.

p.s.
I have crossed the hurdle of creating webhooks. Now its a bit more predictable.

@Kodie_Critzer how do you make sure that the same user exists on both platforms?

They should exist on both platforms through the SSO plugin, right? Our Discourse dev Bhanu set that up originally for me.

1 Like

Update: I am done with the coding for the most part. Now I’ll do a couple of rounds of testing before I roll the stuff out to you.

Awesome! Thank you.

1 Like

Just wondering, if we lock the shop page down, we will need to run a script to add the existing VIP users to the membership. I think we missed this bit.

I want to create a new page that is restricted for VIP that would be something like virginia.lockerroomaccess.com/VIP and within that page we will restrict certain products. Or create a VIP category and restrict that category for VIP. I do not want to restrict the entire shop page.

But doing the backfill will definitely be needed.

1 Like

Yeah, Just realized that. My code seems to work fine with the new members added/removed from the group.

Actually, it wasn’t considered in the quote.

@Kodie_Critzer

How many users are paying customers? I was wondering that, if the number is small, we can add them to the membership manually.

Also, just wondering that somehow you’ve got 200+ admin users on your site? Its most certainly an attack.

I mentioned this to Bhanu (our dev) a while back and he said that it had something to do with the setup of SSO. When logged in as one of those users who is an “admin” they don’t actually have admin rights.

The current number of VIP is so small. You can see them here https://virginia.forums.lockerroomaccess.com/admin/plugins/discourse-subscriptions/subscriptions

1 Like

I think I haven’t got admin access any more.