Question:
My events.js contains handlers to show what events are being fired. The only
event firing is onOrderCanceled
Product:
Wix Studio
What are you trying to achieve:
I want events when a pricing plan is purchased and canceled.
What have you already tried:
The alternative: wixPaidPlans_onPlanPurchased
Additional information:
The contents of my events.js file:
export function wixPricingPlans_onOrderPurchased(event) {
console.log("wixPricingPlans_onOrderPurchased", event)
}
export function wixPricingPlans_onOrderMarkedAsPaid(event) {
console.log("wixPricingPlans_onOrderMarkedAsPaid", event)
}
export function wixPricingPlans_onOrderStarted(event) {
console.log("wixPricingPlans_onOrderStarted", event)
}
export function wixPricingPlans_onOrderEnded(event) {
console.log("wixPricingPlans_onOrderEnded", event)
}
export function wixPaidPlans_onPlanPurchased(event) {
console.log("wixPaidPlans_onPlanPurchased", event)
}
export function wixPricingPlans_onPlanPurchased(event) {
console.log("wixPricingPlans_onPlanPurchased", event)
}
export function wixPricingPlans_onOrderCanceled(event) {
console.log("wixPricingPlans_onOrderCanceled", event)
}
What I get for onPlanCanceled
wixPricingPlans_onOrderCanceled {"metadata":{"id":"f570193d-507c-4d80-97ce-d102996e9060","entityId":"1ddedc00-8c51-4c0d-ace4-1dda20b7e6cc","eventTime":"2025-02-25T10:35:59.435221961Z","triggeredByAnonymizeRequest":false},"data":{"order":{"planId":"ca7da152-9f89-4d6c-a41c-3b5692b4eb42","subscriptionId":"fba924cc-7ead-4b10-866d-34393ee596bb","buyer":{"memberId":"993a2ef5-992d-4096-a8af-4f7b7877ade7","contactId":"993a2ef5-992d-4096-a8af-4f7b7877ade7"},"priceDetails":{"subtotal":"0.00","discount":"0","total":"0","planPrice":"0","currency":"USD","singlePaymentUnlimited":true},"pricing":{"singlePaymentUnlimited":true,"prices":[{"duration":{"cycleFrom":1,"numberOfCycles":1},"price":{"subtotal":"0.00","discount":"0","total":"0","currency":"USD","fees":[],"proration":"0"}}]},"type":"ONLINE","orderMethod":"UNKNOWN","status":"CANCELED","cancellation":{"cause":"MEMBER_ACTION","effectiveAt":"IMMEDIATELY"},"lastPaymentStatus":"NOT_APPLICABLE","startDate":"2025-02-25T10:33:02.329Z","endDate":"2025-02-25T10:35:59.126Z","pausePeriods":[],"cycles":[{"index":1,"startedDate":"2025-02-25T10:33:02.329Z","endedDate":"2025-02-25T10:35:59.126Z"}],"planName":"Family Social & Group Raquet","planDescription":"Family Membership & Group Racquet Membership","planPrice":"0","formData":{"formId":"883df132-d4c0-4916-84ab-fae5c3ff77d5","submissionId":"b080753d-4f48-4130-ab2d-a5caef02d641","submissionData":{}},"statusNew":"CANCELED","_id":"1ddedc00-8c51-4c0d-ace4-1dda20b7e6cc","_createdDate":"2025-02-25T10:33:02.329Z","_updatedDate":"2025-02-25T10:35:59.378Z"}}}
But no othere events are firing? I think this is a bug
And yes, the site is published, my logs are being sent to Google