Skip to content

Commit 6fb0284

Browse files
committed
chore: update upsell message
1 parent 2c5af91 commit 6fb0284

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

classes/Visualizer/Module/Sources.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,14 @@ public function addProUpsell( $old, $feature = null ) {
139139
( in_array( $feature, $pro_features, true ) && ! Visualizer_Module::is_pro() )
140140
) {
141141
$msg = sprintf( __( 'Upgrade to %s to activate this feature!', 'visualizer' ), 'PRO' );
142+
$plus_msg = sprintf( __( 'Upgrade to %s plan to activate this feature!', 'visualizer' ), 'Plus' );
142143
if ( in_array( $feature, $biz_features, true ) && Visualizer_Module::is_pro() ) {
143-
$msg = sprintf( __( 'Upgrade to %s plan to activate this feature!', 'visualizer' ), 'Plus' );
144+
$msg = $plus_msg;
144145
}
146+
if ( in_array( $feature, [ 'db-query', 'chart-permissions' ], true ) ) {
147+
$msg = $plus_msg;
148+
}
149+
145150
$return = '<div class="only-pro-content">';
146151
$return .= ' <div class="only-pro-container">';
147152
$return .= ' <div class="only-pro-inner">';

tests/e2e/specs/upsell.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ test.describe( 'Upsell', () => {
7070
expect( searchParams.get('utm_campaign') ).toBe('db-query');
7171

7272
await page.frameLocator('iframe').getByRole('heading', { name: /Import from database/ }).click();
73-
await expect(page.frameLocator('iframe').locator('#vz-db-wizard')).toContainText('Upgrade to Developer plan to activate this feature!');
73+
await expect(page.frameLocator('iframe').locator('#vz-db-wizard')).toContainText('Upgrade to Plus plan to activate this feature!');
7474
await expect(page.frameLocator('iframe').locator('#vz-db-wizard')).toContainText('Upgrade Now');
7575

7676
await page.frameLocator('iframe').getByRole('link', { name: 'Settings' }).click();
@@ -90,7 +90,7 @@ test.describe( 'Upsell', () => {
9090
searchParams = new URLSearchParams(href);
9191
expect( searchParams.get('utm_campaign') ).toBe('chart-permissions');
9292
await page.frameLocator('iframe').getByRole('heading', { name: /Permissions/ }).click();
93-
await expect(page.frameLocator('iframe').locator('#vz-db-wizard')).toContainText('Upgrade to Developer plan to activate this feature!');
93+
await expect(page.frameLocator('iframe').locator('#vz-db-wizard')).not.toContainText('Upgrade to Plus plan to activate this feature!');
9494
await expect(page.frameLocator('iframe').locator('#vz-db-wizard')).toContainText('Upgrade Now');
9595
});
9696

0 commit comments

Comments
 (0)