From 2add9dbc70dd0d5b9a6700a86b0f2f473e2f654d Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Wed, 18 Sep 2024 16:17:38 -0300 Subject: [PATCH 1/5] Add utm content to upgrade CTAs --- classes/helpers/FrmAppHelper.php | 8 +++++++- classes/helpers/FrmDashboardHelper.php | 9 ++++++++- classes/views/frm-settings/license_box.php | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 9c1b24d68a..bbf029e505 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -1367,10 +1367,16 @@ public static function print_admin_banner( $should_show_lite_upgrade ) { ?>
'settings-license', + 'content' => 'lite-banner', + ) + ); printf( /* translators: %1$s: Start link HTML, %2$s: End link HTML */ esc_html__( 'You\'re using Formidable Forms Lite. To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ), - '', + '', '' ); ?> diff --git a/classes/helpers/FrmDashboardHelper.php b/classes/helpers/FrmDashboardHelper.php index fde01fb280..01e52934c0 100644 --- a/classes/helpers/FrmDashboardHelper.php +++ b/classes/helpers/FrmDashboardHelper.php @@ -196,6 +196,13 @@ class="" * @return array */ public static function get_license_buttons() { + $upgrade_link = FrmAppHelper::admin_upgrade_link( + array( + 'medium' => 'settings-license', + 'content' => 'dashboard-license-box', + ) + ); + return array( array( 'label' => __( 'Connect Account', 'formidable' ), @@ -204,7 +211,7 @@ public static function get_license_buttons() { ), array( 'label' => __( 'Get Formidable PRO', 'formidable' ), - 'link' => FrmAppHelper::admin_upgrade_link( 'settings-license' ), + 'link' => $upgrade_link, 'classes' => 'frm-button-secondary frm-show-unauthorized', ), ); diff --git a/classes/views/frm-settings/license_box.php b/classes/views/frm-settings/license_box.php index a8591dde0f..d53411b5af 100644 --- a/classes/views/frm-settings/license_box.php +++ b/classes/views/frm-settings/license_box.php @@ -9,7 +9,7 @@ - +

@@ -23,7 +23,7 @@ printf( /* translators: %1$s: Start link HTML, %2$s: End link HTML */ esc_html__( 'To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ), - '', + '', '' ); ?> From ea721e8bbd5e3055ab0ab1ad9b7a295f81d41d03 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Wed, 18 Sep 2024 16:24:34 -0300 Subject: [PATCH 2/5] Add another utm content to another CTA --- classes/views/dashboard/templates/pro-features-list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/views/dashboard/templates/pro-features-list.php b/classes/views/dashboard/templates/pro-features-list.php index 8ad74f3cba..c0b42a8f98 100644 --- a/classes/views/dashboard/templates/pro-features-list.php +++ b/classes/views/dashboard/templates/pro-features-list.php @@ -21,7 +21,7 @@ - +
From 03f97b1f4c0d170b7020e3125a0c9cc675388fc9 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Wed, 18 Sep 2024 17:01:45 -0300 Subject: [PATCH 3/5] Fix phpcs issue --- classes/views/frm-settings/license_box.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/classes/views/frm-settings/license_box.php b/classes/views/frm-settings/license_box.php index d53411b5af..4e95936356 100644 --- a/classes/views/frm-settings/license_box.php +++ b/classes/views/frm-settings/license_box.php @@ -2,6 +2,19 @@ if ( ! defined( 'ABSPATH' ) ) { die( 'You are not allowed to call this page directly.' ); } + +$button_upgrade_link = FrmAppHelper::admin_upgrade_link( + array( + 'medium' => 'settings-license', + 'content' => 'global-settings-license-box-get-formidable-button', + ) +); +$unlock_more_upgrade_link = FrmAppHelper::admin_upgrade_link( + array( + 'medium' => 'settings-license', + 'content' => 'global-settings-license-box-unlock-more', + ) +); ?>

@@ -9,7 +22,7 @@ - +

@@ -23,7 +36,7 @@ printf( /* translators: %1$s: Start link HTML, %2$s: End link HTML */ esc_html__( 'To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ), - '', + '', '' ); ?> From 771d08f08942665fc29a4b598fe148b51ed97114 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Wed, 18 Sep 2024 17:02:31 -0300 Subject: [PATCH 4/5] Fix alignment --- classes/views/frm-settings/license_box.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/views/frm-settings/license_box.php b/classes/views/frm-settings/license_box.php index 4e95936356..1a3a516cad 100644 --- a/classes/views/frm-settings/license_box.php +++ b/classes/views/frm-settings/license_box.php @@ -5,13 +5,13 @@ $button_upgrade_link = FrmAppHelper::admin_upgrade_link( array( - 'medium' => 'settings-license', + 'medium' => 'settings-license', 'content' => 'global-settings-license-box-get-formidable-button', ) ); $unlock_more_upgrade_link = FrmAppHelper::admin_upgrade_link( array( - 'medium' => 'settings-license', + 'medium' => 'settings-license', 'content' => 'global-settings-license-box-unlock-more', ) ); From 5002e708ba6bcb11230ac012103b06cd3a3aabe6 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Wed, 18 Sep 2024 17:04:21 -0300 Subject: [PATCH 5/5] Fix phpcs --- classes/helpers/FrmDashboardHelper.php | 2 +- classes/views/dashboard/templates/pro-features-list.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/classes/helpers/FrmDashboardHelper.php b/classes/helpers/FrmDashboardHelper.php index 01e52934c0..2cbd0116e6 100644 --- a/classes/helpers/FrmDashboardHelper.php +++ b/classes/helpers/FrmDashboardHelper.php @@ -200,7 +200,7 @@ public static function get_license_buttons() { array( 'medium' => 'settings-license', 'content' => 'dashboard-license-box', - ) + ) ); return array( diff --git a/classes/views/dashboard/templates/pro-features-list.php b/classes/views/dashboard/templates/pro-features-list.php index c0b42a8f98..a1594f0aeb 100644 --- a/classes/views/dashboard/templates/pro-features-list.php +++ b/classes/views/dashboard/templates/pro-features-list.php @@ -9,6 +9,13 @@ if ( ! defined( 'ABSPATH' ) ) { die( 'You are not allowed to call this page directly.' ); } + +$discount_link = FrmAppHelper::admin_upgrade_link( + array( + 'medium' => 'dashboard-discount', + 'content' => 'dashboard-defy-limits-cta', + ) +); ?>
@@ -21,7 +28,7 @@ - +