Difference between AccessAfterInsert and PaymentWithAccessAfterInsert

Discussion in 'Customization & add-ons' started by riccardo, Jul 11, 2016.

Thread Status:
Not open for further replies.
  1. riccardo

    riccardo New Member

    Joined:
    May 19, 2016
    Messages:
    13
    A plugin I'm developing needs to know when access to a product is created, updated, or deleted.

    I added onAccessAfterInsert, onAccessAfterUpdate, and onAccessAfterDelete functions to the plugin, tried signing up as a new user and purchasing a subscription, but onAccessAfterInsert was not called.

    I have verified that my plugin is loaded correctly.

    Do I need an onPaymentWithAccessAfterInsert function, too? What's the difference between the two events AccessAfterInsert and PaymentWithAccessAfterInsert?

    Thanks in advance
    Riccardo
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    PaymentWithAccessAfterInsert is complex event. It triggered once payment and all associated access records is inserted.

    AccessAfterInsert is DB event. It triggered once record inserted to table access.

    After payment both events will be triggered.
  3. riccardo

    riccardo New Member

    Joined:
    May 19, 2016
    Messages:
    13
    Thanks a lot Caesar, that's exactly the bit of information I was missing!
    caesar likes this.
Thread Status:
Not open for further replies.

Share This Page