- Posts: 6
- Thank you received: 0
Plugin method triggered by new subscription only
- Christoff
- Topic Author
- Offline
- New Member
-
Less
More
4 years 9 months ago #139661
by Christoff
Plugin method triggered by new subscription only was created by Christoff
Hi Tuan.
I've read your documentation for Membership Pro plugins and I've done a few tests myself, but I can't confidently identify a method that I can use to reliably trigger an action for a new subscription.
I thought the onAfterStoreSubscription method would be the one I needed, but in tests it's triggered for renewals as well as new subscriptions. Please could you advise of a way to identify new subscriptions only using the plugin methods? My intention is to trigger a series of events for new subscribers only.
Any assistance you can offer is greatly appreciated.
Thanks.
I've read your documentation for Membership Pro plugins and I've done a few tests myself, but I can't confidently identify a method that I can use to reliably trigger an action for a new subscription.
I thought the onAfterStoreSubscription method would be the one I needed, but in tests it's triggered for renewals as well as new subscriptions. Please could you advise of a way to identify new subscriptions only using the plugin methods? My intention is to trigger a series of events for new subscribers only.
Any assistance you can offer is greatly appreciated.
Thanks.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
4 years 9 months ago #139663
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Plugin method triggered by new subscription only
Hello
You can still use onAfterStoreSubscription . In that method, you can use $row->act parameter:
- if $row->act == 'renew' , it's a renewal
- if $row->act == 'upgrade', it's a subscription upgrade
- Otherwise, it is new subscription
Tuan
You can still use onAfterStoreSubscription . In that method, you can use $row->act parameter:
- if $row->act == 'renew' , it's a renewal
- if $row->act == 'upgrade', it's a subscription upgrade
- Otherwise, it is new subscription
Tuan
Please Log in or Create an account to join the conversation.
- Christoff
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
4 years 9 months ago #139882
by Christoff
Replied by Christoff on topic Plugin method triggered by new subscription only
Hi Tuan.
Thanks for getting back to me. That seems to be working well - thanks. For the future perhaps the onAfterStoreSubscription method could have an $isNew property (like onAfterSaveSubscriptionPlan) so that it's clearer.
I do appreciate your ongoing efforts with this extension.
Thanks for getting back to me. That seems to be working well - thanks. For the future perhaps the onAfterStoreSubscription method could have an $isNew property (like onAfterSaveSubscriptionPlan) so that it's clearer.
I do appreciate your ongoing efforts with this extension.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
4 years 9 months ago #139892
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Plugin method triggered by new subscription only
I will have to check it again but I think onAfterStoreSubscription is only triggered for new subscription (I might be wrong, need to check the code again)
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.