Membership_id and Subscription Stored Script

  • Nina Mårtensson
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #130434 by Nina Mårtensson
Membership_id and Subscription Stored Script was created by Nina Mårtensson
I run a script in "Subscription Stored Script" and in this script I want to compare membership_id with another table. I use $row to get subscription values but the membership_id is always 0 in my "Subscription Stored Script" when I add a new subscription in backend. I assume it's because it's generated on subscription save somehow and $row->membership_id doesn't exists when "Subscription Stored Script" is executed? All the other $row values are there and I've checked that my script is working.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
5 years 9 months ago #130467 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership_id and Subscription Stored Script
Hello Nina

Membership ID will only be generated for active subscription (mean after payment was processed)

So that data is not available on Subscription Stored Script (triggered before payment processing)

If you want to access to that data, you will have to use use Subscription Active Subscriptipt

Tuan

Please Log in or Create an account to join the conversation.

  • Nina Mårtensson
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #130475 by Nina Mårtensson
Replied by Nina Mårtensson on topic Membership_id and Subscription Stored Script
Ok, I figured as much. I'll look into using Subscription Active script instead.
Thanks!

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
5 years 9 months ago #130484 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership_id and Subscription Stored Script
OK Nina. Good luck and if you have questions, please don't hesitate to ask

Regards,

Tuan

Please Log in or Create an account to join the conversation.