• Resolved jpbailey12

    (@jpbailey12)


    Will you be updating the documentation (soon).

    Downloading and searching the codebase seems to indicate that there is not surecart/order_created hook. Also it doesn’t work which is why I looked.

    There is a purchase_created hook but it only works with 1 argument not two as per doc here:

    add_action( ‘surecart/purchase_created’, ‘purchaseCreated’ ); function purchaseCreated($purchase, $webhook_data = []) { // }

    Is there an update to doc coming.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jpbailey12

    (@jpbailey12)

    more to follow:

    • This reply was modified 4 months, 2 weeks ago by jpbailey12.
    • This reply was modified 4 months, 2 weeks ago by jpbailey12.
    Plugin Support Ivan C.

    (@ivanbsf)

    Hello @jpbailey12

    Thank you for reporting it and apologies for any delays. I will escalate it to the development team. If you have any questions or concerns, please contact us through the website support for a quicker response.

    Best,

    Plugin Author Andre Gagnon

    (@2winfactor)

    Hi There,

    Thanks for reaching out. These are dynamically generated based on the webhook event, so you won’t see them in plain text (which is why you are not seeing it by simply searching the codebase). However, the plugin does not subscribe to this one specifically, as everything is handled with surecart/purchase_created. This is preferable because an order can have many line items, so this is specific to a line item.

    Should you want to listen for surecart/order_created, you will need to update your webhook on app.surecart.com to broadcast that event.

    For purchase_created, the webhook argument is optional, as this can fire outside of the webhook process (i.e. when a person checks out on the site).

    Can you explain more what you are trying to accomplish? Perhaps we can point you in the right direction.

    I would love to see WordPress hooks fire even if the associated webhook isn’t enabled.

    If a plugin wants to integrate with SureCart, they can’t be guaranteed that certain WordPress hooks will fire. This makes it challenging to integrate with SureCart.

    • This reply was modified 2 months, 4 weeks ago by Andrew Mead.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.