PHP script trigger

  • Trevor Smith
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 weeks 7 hours ago #170068 by Trevor Smith
PHP script trigger was created by Trevor Smith
Hi

I am trying to use the PHP Script plugin to update another table. I have entered the code into the Subscription Stored Script but it only seems to be triggered when I save a new subscription. Is there a way of getting it to be triggered when an existing subscription is edited as well?

Best regards
Trevor

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

More
2 weeks 6 hours ago #170071 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PHP script trigger
Hi Trevor

Who update the subscription ? Is it from subscriptions management page?

Tuan

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

  • Trevor Smith
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 weeks 6 hours ago #170072 by Trevor Smith
Replied by Trevor Smith on topic PHP script trigger
Hi Tuan

Yes, it is from the Subscriptions Management page. I have tried from the front-end and back-end but the script is only triggered when saving a new subscription.

Best regards
Trevor

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

More
2 weeks 6 hours ago #170073 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PHP script trigger
Yes, the subscription is only executed when new subscription is saved. I will see if I can add support for subscription update script

Tuan

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

  • Trevor Smith
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 weeks 6 hours ago #170074 by Trevor Smith
Replied by Trevor Smith on topic PHP script trigger
That would be great. Thanks Tuan.

Trevor

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

More
2 weeks 5 hours ago #170075 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PHP script trigger
Hello

I just updated the PHP script plugin to include a new setting called Subscription Update Script which will be executed when subscription record is updated in subscription management

Please install the updated plugin, then use the new script option to see if it works. If Yes, I can include it in next release of the extension

Regards,

Tuan

 
Attachments:

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

  • Trevor Smith
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 weeks 5 hours ago #170076 by Trevor Smith
Replied by Trevor Smith on topic PHP script trigger
Sorry Tuan but it doesn't seem to work. Still only triggering on new entries.

Trevor

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

More
1 week 6 days ago #170082 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PHP script trigger
Did you enter your script into Subscription Update Script (not Subscription Store Script) ?

Regards,

Tuan

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

  • Trevor Smith
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 week 6 days ago #170083 by Trevor Smith
Replied by Trevor Smith on topic PHP script trigger
I entered the script into the box labelled 'Subscription Stored Script'.

Trevor

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

More
1 week 5 days ago #170094 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PHP script trigger
The same script needs to be entered into Subscription Update Script, please

Tuan

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