From 4d4e8802eb00c2e31b7bcde0cd8f7103dd395728 Mon Sep 17 00:00:00 2001 From: Truong Giang Date: Wed, 11 Feb 2026 23:46:52 +0700 Subject: [PATCH 1/2] Track viewing the Coupons tab --- classes/models/FrmUsage.php | 2 +- stripe/controllers/FrmTransLiteListsController.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/models/FrmUsage.php b/classes/models/FrmUsage.php index 10a6fc151e..ea6c8de6df 100644 --- a/classes/models/FrmUsage.php +++ b/classes/models/FrmUsage.php @@ -214,7 +214,7 @@ private function clean_before_send( &$data ) { } // If key ends with `_email`, or value contains `@`, this might contain an email address. - if ( str_ends_with( $key, '_email' ) || str_contains( $value, '@' ) ) { + if ( str_ends_with( $key, '_email' ) || is_string( $value ) && str_contains( $value, '@' ) ) { // Replace it with a placeholder. $value = '{{contain_email}}'; } diff --git a/stripe/controllers/FrmTransLiteListsController.php b/stripe/controllers/FrmTransLiteListsController.php index 54188cbb32..411567c049 100755 --- a/stripe/controllers/FrmTransLiteListsController.php +++ b/stripe/controllers/FrmTransLiteListsController.php @@ -117,6 +117,8 @@ public static function route( $action ) { if ( 'coupons' === $action ) { FrmAppHelper::permission_check( 'frm_change_settings' ); + FrmUsageController::update_flows_data( 'coupons', 'view_tab' ); + include FrmTransLiteAppHelper::plugin_path() . '/views/lists/coupons.php'; return; } From aa895a6d06bf70eecf834d35cbc25a28f8d91b28 Mon Sep 17 00:00:00 2001 From: Truong Giang Date: Wed, 11 Feb 2026 23:55:01 +0700 Subject: [PATCH 2/2] Only track viewing upsell coupons tab --- stripe/controllers/FrmTransLiteListsController.php | 2 -- stripe/views/lists/coupons-upsell.php | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stripe/controllers/FrmTransLiteListsController.php b/stripe/controllers/FrmTransLiteListsController.php index 411567c049..54188cbb32 100755 --- a/stripe/controllers/FrmTransLiteListsController.php +++ b/stripe/controllers/FrmTransLiteListsController.php @@ -117,8 +117,6 @@ public static function route( $action ) { if ( 'coupons' === $action ) { FrmAppHelper::permission_check( 'frm_change_settings' ); - FrmUsageController::update_flows_data( 'coupons', 'view_tab' ); - include FrmTransLiteAppHelper::plugin_path() . '/views/lists/coupons.php'; return; } diff --git a/stripe/views/lists/coupons-upsell.php b/stripe/views/lists/coupons-upsell.php index 5814e7e4d7..04204f8e57 100755 --- a/stripe/views/lists/coupons-upsell.php +++ b/stripe/views/lists/coupons-upsell.php @@ -4,6 +4,9 @@ } $images_folder_url = FrmAppHelper::plugin_url() . '/images/coupons/'; + +// Track the view of the upsell coupons tab in the usage data. +FrmUsageController::update_flows_data( 'coupons', 'view_tab' ); ?>