Dir Pro Notification Not sent when using Stripe Gateway
-
Hi,
I’ve been trying to get to the bottom of an issue that could be down to a number of plugins, but after debugging, I think the problem lies with BNFW. We’ve got a site setup with Directories Pro with a notification due to go out when a listing is published. The listings get published when payment is completed. This has been working fine for some time when using the WooCommerce PayPal gateway. We’ve recently added Stripe giving users the choice, but when a user pays via the Stripe?gateway the listing published notification does not go out (even though the listing is marked as published).
I’ve done a fair bit of debugging, and think this may be down to a race condition exacerbated by the asynchronous notifications queue. After payment I see?the notification is created via
publish_post()
andsend_notification_async()
is invoked with the correct notification.
This is where the problems seem to start.set_transient( 'bnfw-async-notifications', $transient, 600 );
call is returning 0, suggesting that the value is already in the transient?. Debugging at this point with:error_log( $wpdb->last_error );
error_log( $wpdb->last_query );
I get no error and the query looks something like this:
UPDATE
wpqc_options
SEToption_value
= ‘a:2:{i:0;a:3:{s:6:\\”ref_id\\”;i:105057;s:15:\\”notification_id\\”;i:14207;s:17:\\”notification_type\\”;s:21:\\”pending-sales_dir_ltg\\”;}i:1;a:3:{s:6:\\”ref_id\\”;i:105057;s:15:\\”notification_id\\”;i:21088;s:17:\\”notification_type\\”;s:17:\\”new-sales_dir_ltg\\”;}}’ WHEREoption_name
= ‘_transient_bnfw-async-notifications’Fast forward to
on_shutdown()
and theget_transient( 'bnfw-async-notifications' );
call returns false / empty and thus no notification is sent. I’m really stumped as to why BNFW is failing to write the transient for the message queue under these circumstances.Have you seen issues similar to this before? Could multiple requests (checkout complete and Stripe webhook) be causing problems with this? Any help or pointers very gratefully received.
Thanks,
Andy
- The topic ‘Dir Pro Notification Not sent when using Stripe Gateway’ is closed to new replies.