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 ) {
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"> ' ;
Original file line number Diff line number Diff 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 : / 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!' ) ;
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 : / 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!' ) ;
9494 await expect ( page . frameLocator ( 'iframe' ) . locator ( '#vz-db-wizard' ) ) . toContainText ( 'Upgrade Now' ) ;
9595 } ) ;
9696
You can’t perform that action at this time.
0 commit comments