Skip to content

Commit 457530f

Browse files
authored
Add a filter call when updating an existent intent (saved in the order) (#2251)
* Add a filter call when updating an existent intent (saved in the order)
1 parent d0d5a04 commit 457530f

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
= 6.1.0 - 2022-xx-xx =
44
* Tweak - Use the newly exposed LoadableMask component provided by WooCommerce Blocks to trigger the loading state for Payment Request Buttons.
5+
* Add - Add filter call when updating an existent intent (wc_stripe_update_existing_intent_request).
56

67
= 6.0.0 - 2022-01-05 =
78
* Fix - Fixed capitalization for payment method names: iDEAL, giropay, and Sofort.

includes/abstracts/abstract-wc-stripe-payment-gateway.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,16 @@ public function update_existing_intent( $intent, $order, $prepared_source ) {
13751375
return $intent;
13761376
}
13771377

1378+
/**
1379+
* Filter the value of the request.
1380+
*
1381+
* @since x.x.x
1382+
* @param array $request Request to send to Stripe API.
1383+
* @param WC_Order $order Order that the intent is associated with.
1384+
* @param object $source Currently selected source.
1385+
*/
1386+
$request = apply_filters( 'wc_stripe_update_existing_intent_request', $request, $order, $prepared_source );
1387+
13781388
$level3_data = $this->get_level3_data_from_order( $order );
13791389
return WC_Stripe_API::request_with_level3_data(
13801390
$request,

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,6 @@ If you get stuck, you can ask for help in the Plugin Forum.
130130

131131
= 6.x.x - 2022-xx-xx =
132132
* Tweak - Use the newly exposed LoadableMask component provided by WooCommerce Blocks to trigger the loading state for Payment Request Buttons.
133-
133+
* Add - Add filter call when updating an existent intent (wc_stripe_update_existing_intent_request).
134134

135135
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

0 commit comments

Comments
 (0)