Stripe Webhooks should not be deleted when Stripe webhooks are refreshed in WooCommerce
Description
This case happens when both GiveWP and WooCommerce are connected to the same Stripe account. WooCommerce doesn’t allow an account already connected to GiveWP to be connected with them, but GiveWP allows an account already connected to WooCommerce.
This can happen for websites that already have WooCommerce installed and then add GiveWP. If both are using the same Stripe account, refreshing the webhooks in WooCommerce will delete the webhooks from GiveWP in the Stripe account.
Current Behavior: GiveWP webhooks are deleted from the connected Stripe account, and this causes all the incoming donations to be stuck in “Processing“.
Expected Behavior: Refreshing Stripe webhooks in WooCommerce does not impact GiveWP.
Workaround: The solution, for now, is to re-add the webhooks manually.
-
Steps to Reproduce
- Create a website with both WooCommerce and GiveWP installed. Have the WooCommerce Stripe Gateway plugin installed as well to collect Stripe payments in WooCommerce.
- Connect your Stripe account with WooCommerce.
- Subsequently, connect the same Stripe account with GiveWP.
- The order of the previous steps are essential, as WooCommerce doesn’t allow an account already connected to GiveWP to be connected to them. GiveWP, however, allows an account already connected to WooCommerce to be connected.
- Once that’s done, set up the GiveWP Stripe Webhooks. (tip: just add all the events, it doesn’t matter cause they’re going to be deleted later).
- Thereafter, go to WooCommerce → Settings → Payments → Stripe → Gateway → Manage → Stripe Settings. Then configure the connection, and then click on Reconfigure Webhooks. This will regenerate the WooCommerce webhooks for the Stripe account.
- Go to the Webhooks in your Stripe account dashboard again, and observe that the GiveWP webhooks (for the same URL) are now gone.
Screenshots / Videos
[https://www.loom.com/share/9b7195cda8714d608f641a56c554f27b?sid=158ed061-1514-4344-9fa7-5aff8cb7259f|https://www.loom.com/share/9b7195cda8714d608f641a56c554f27b?sid=158ed061-1514-4344-9fa7-5aff8cb7259f|smart-link]
-
Environment
- Device: All
- Browser: All
- Plugin Version: 4.0.0
- WordPress Version: 6.7.2
- PHP Version: 8
-
Additional Information
I’m not sure why, but WooCommerce doesn’t allow an account that’s already connected to GiveWP to be connected to them. GiveWP allows an account that’s already connected to WooCommerce. Given that, this bug happens specifically for websites wherein WooCommerce has already been installed/being used and then suddenly they add GiveWP.
-
Reference: [https://givewp.featureos.app/p/stripe-webhooks-should-not-be-deleted-when-stripe-webhooks-are-refreshed-in-woocommerce|https://givewp.featureos.app/p/stripe-webhooks-should-not-be-deleted-when-stripe-webhooks-are-refreshed-in-woocommerce|smart-link]
Subscribe to post
Get notified by email when there are changes.