Skip to content

Commit

Permalink
Merge branch 'develop' into add/country-specific-test-cards
Browse files Browse the repository at this point in the history
  • Loading branch information
timur27 authored Nov 8, 2024
2 parents 4bfaf0e + 716a80e commit 2062258
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: update

When tracking is enabled, send a tracks event when the merchant is redirected to a Stripe Capital offer.

2 changes: 2 additions & 0 deletions includes/class-wc-payments-redirect-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use WCPay\Core\Server\Request\Get_Account_Capital_Link;
use WCPay\Core\Server\Request\Get_Account_Login_Data;
use WCPay\Exceptions\API_Exception;
use WCPay\Tracker;

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
Expand Down Expand Up @@ -92,6 +93,7 @@ public function redirect_to_capital_view_offer_page(): void {
$request->set_refresh_url( $refresh_url );

$capital_link = $request->send();
Tracker::track_admin( 'wcpay_capital_view_offer_redirect' );
$this->redirect_to( $capital_link['url'] );
} catch ( Exception $e ) {

Expand Down

0 comments on commit 2062258

Please sign in to comment.