From f327d423f4a15fe7cdd1e600c52faab787810f7d Mon Sep 17 00:00:00 2001 From: Eric Jinks <3147296+Jinksi@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:44:21 +1000 Subject: [PATCH 1/3] Record a tracks event when a merchant is redirected to a Stripe Capital loan offer --- includes/class-wc-payments-redirect-service.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/class-wc-payments-redirect-service.php b/includes/class-wc-payments-redirect-service.php index bc4c3c77a54..7863cf0aa6d 100644 --- a/includes/class-wc-payments-redirect-service.php +++ b/includes/class-wc-payments-redirect-service.php @@ -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. @@ -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 ) { From 462372eb57534552fa2c31f918af56e52ab95e40 Mon Sep 17 00:00:00 2001 From: Eric Jinks <3147296+Jinksi@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:46:51 +1000 Subject: [PATCH 2/3] Add changelog entry --- .../fix-9651-record-tracks-event-capital-view-offer-redirect | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/fix-9651-record-tracks-event-capital-view-offer-redirect diff --git a/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect b/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect new file mode 100644 index 00000000000..f68b2fcae13 --- /dev/null +++ b/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect @@ -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 + + From 78dba7206837fdbe5de0b8f60c48fab1956ab52d Mon Sep 17 00:00:00 2001 From: Eric Jinks <3147296+Jinksi@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:52:29 +1000 Subject: [PATCH 3/3] Make changelog public Co-authored-by: Shendy <73803630+shendy-a8c@users.noreply.github.com> --- .../fix-9651-record-tracks-event-capital-view-offer-redirect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect b/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect index f68b2fcae13..57b1e4a1a7d 100644 --- a/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect +++ b/changelog/fix-9651-record-tracks-event-capital-view-offer-redirect @@ -1,5 +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 +When tracking is enabled, send a tracks event when the merchant is redirected to a Stripe Capital offer.