File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
classes/Visualizer/Module Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -139,9 +139,14 @@ public function addProUpsell( $old, $feature = null ) {
139
139
( in_array ( $ feature , $ pro_features , true ) && ! Visualizer_Module::is_pro () )
140
140
) {
141
141
$ 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 ' );
142
143
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 ;
144
145
}
146
+ if ( in_array ( $ feature , [ 'db-query ' , 'chart-permissions ' ], true ) ) {
147
+ $ msg = $ plus_msg ;
148
+ }
149
+
145
150
$ return = '<div class="only-pro-content"> ' ;
146
151
$ return .= ' <div class="only-pro-container"> ' ;
147
152
$ return .= ' <div class="only-pro-inner"> ' ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ test.describe( 'Upsell', () => {
70
70
expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'db-query' ) ;
71
71
72
72
await page . frameLocator ( 'iframe' ) . getByRole ( 'heading' , { name : / I m p o r t f r o m d a t a b a s e / } ) . 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!' ) ;
74
74
await expect ( page . frameLocator ( 'iframe' ) . locator ( '#vz-db-wizard' ) ) . toContainText ( 'Upgrade Now' ) ;
75
75
76
76
await page . frameLocator ( 'iframe' ) . getByRole ( 'link' , { name : 'Settings' } ) . click ( ) ;
@@ -90,7 +90,7 @@ test.describe( 'Upsell', () => {
90
90
searchParams = new URLSearchParams ( href ) ;
91
91
expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'chart-permissions' ) ;
92
92
await page . frameLocator ( 'iframe' ) . getByRole ( 'heading' , { name : / P e r m i s s i o n s / } ) . 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!' ) ;
94
94
await expect ( page . frameLocator ( 'iframe' ) . locator ( '#vz-db-wizard' ) ) . toContainText ( 'Upgrade Now' ) ;
95
95
} ) ;
96
96
You can’t perform that action at this time.
0 commit comments