Auth0 Home Blog Docs

Wordpress Woocommerce Subscriptions connection

Hi,

i try to find a way to get a user with a active woocommerce subscription unblocked and blocked with a inactive subscription in Auth0 automaticly. Did anyone has a idea to make that possible?

Thanks for help

Best Regards

Hey there @info25!

Don’t have much of WordPress experience myself but let me ask someone who does! Will get back to you soon!

Hi,
Thank you thats awesome.

regards

No worries we’re here for you!

@info25 - Hi there! Happy to help but I’m not entirely clear what you’re asking. Auth0 users don’t have a “subscription” that gets turned on or off. You can block users, which will not allow them to log in. That gets exposed in a blocked property for the user:

{
  "email_verified": true,
  "email": "xyz@auth0.com",
  "updated_at": "2019-06-26T16:14:04.778Z",
  "name": "josh",
  "nickname": "josh.cunningham",
  "created_at": "2019-04-17T22:07:46.041Z",
  "blocked": false,
  "app_metadata": {},
  "last_login": "2019-06-26T16:09:29.954Z",
  "logins_count": 108
}

… which is stored in the auth0_obj meta field.

Hello Josh,
thank you for your respond. I go more in the detail. I use woocommerce to sell subscriptions at wordpress and the user becomse the login data after succesfull payment, than he can login to our app service on ios with auth0 via custom database connection. the target is to block a user automatic when the subscription ends.

thanks
best regards

You’ll need to hit the Management API, Update User endpoint to set blocked to true. The default configuration for the plugin will allow this action but you’ll need to write the script to make this call at the appropriate time. This thread should help a bit.

1 Like