Skip to content

Conversation

@diegocurbelo
Copy link
Member

@diegocurbelo diegocurbelo commented Dec 11, 2025

Fixes STRIPE-852
Related STRIPE-834

Changes proposed in this Pull Request:

The PR changes BLIK webhook processing from deferred to immediate.

This means BLIK payments now process payment_intent.succeeded webhooks immediately (like voucher and wallet payments) instead of deferring them.

Testing instructions

  1. Connect a Stripe Poland account
  2. Make sure the store can receive webhooks (using jurassic.tube for example)
  3. Set the store currency to PLN and enable BLIK in the payment methods list
  4. Add a product to the cart and select BLIK as the payment method
  5. Click Place Order
  6. Verify the Order confirmation page loads successfully and that the payment method is BLIK:
    Screenshot 2025-12-11 at 15 12 27
  7. Navigate to My Account > Orders, in develop the order remains in the Pending payment status for 2 minutes before transitioning to Processing:
    Screenshot 2025-12-11 at 15 14 33
    But, with this branch (fix/852-remove-deferred-webhook-processing-for-blik-confirmation-event), it takes just a couple of seconds before processing the payment:
    Screenshot 2025-12-11 at 15 15 59
  8. Navigate to WP-Admin > WooCommerce > Orders and select the order created above
  9. Check the Order notes that there is no delay between the intent created and the charge complete notes:
    Screenshot 2025-12-11 at 15 20 21

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes BLIK payment webhook processing from deferred to immediate execution, aligning it with voucher and wallet payment handling. When a payment_intent.succeeded webhook is received for a BLIK payment, it will now be processed immediately instead of being scheduled for deferred processing.

Key Changes

  • BLIK payments now process payment_intent.succeeded webhooks immediately like voucher and wallet payments
  • Added test coverage for BLIK payment webhook handling
  • Improved logging levels throughout webhook handlers

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
includes/class-wc-stripe-webhook-handler.php Added BLIK payment type detection and included it in the immediate webhook processing condition
tests/phpunit/WC_Stripe_Webhook_Handler_Test.php Added test case for BLIK payment webhook processing
readme.txt Added changelog entry for BLIK webhook processing change
changelog.txt Added changelog entry for BLIK webhook processing change
includes/abstracts/abstract-wc-stripe-payment-gateway.php Improved logging levels and structure for charge response processing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@diegocurbelo diegocurbelo marked this pull request as ready for review December 11, 2025 18:22
@diegocurbelo diegocurbelo requested review from a team, malithsen and wjrosa and removed request for a team December 11, 2025 18:22
// Process the webhook now if it's for a voucher or wallet payment, or if filtered to process immediately and order is not awaiting action.
if ( $is_voucher_payment || $is_wallet_payment || ( ! $process_webhook_async && ! $is_awaiting_action ) ) {
// Process the webhook now if it's for a voucher, wallet, or BLIK payment, or if filtered to process immediately and order is not awaiting action.
if ( $is_voucher_payment || $is_wallet_payment || $is_blik_payment || ( ! $process_webhook_async && ! $is_awaiting_action ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there's a chance of this check getting longer, but maybe we could update it to use a single variable for the payment methods, like $is_immediate_processing_method.

$immediate_processing_methods    = array_merge( WC_Stripe_Payment_Methods::VOUCHER_PAYMENT_METHODS, WC_Stripe_Payment_Methods::WALLET_PAYMENT_METHODS, [ WC_Stripe_Payment_Methods::BLIK ] );
$is_immediate_processing_method = in_array( $payment_type_meta, immediate_processing_methods, true );

Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Left a totatlly optional suggestion

Copy link
Contributor

@malithsen malithsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and tests well

@diegocurbelo diegocurbelo merged commit 6226ac9 into develop Dec 16, 2025
44 of 50 checks passed
@diegocurbelo diegocurbelo deleted the fix/852-remove-deferred-webhook-processing-for-blik-confirmation-event branch December 16, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants