Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record a tracks event when a merchant is redirected to a Stripe Capital loan offer #9652

Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: update
Comment: Insignificant user-facing change – adding a new tracks event when the merchant is redirected to a Stripe Capital offer

Jinksi marked this conversation as resolved.
Show resolved Hide resolved

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
Loading