| @@ -132,23 +132,23 @@ | ||
| 132 | 132 | public function addProUpsell( $old, $feature = null ) { |
| 133 | 133 | $biz_features = array( 'schedule-chart', 'chart-permissions', 'db-query' ); |
| 134 | 134 | $return = ''; |
| 135 | 135 | $feature = strval( $feature ); |
| 136 | - if ( empty( $feature ) || ( in_array( $feature, $biz_features ) && ! apply_filters( 'visualizer_is_business', false ) ) ) { | |
| 137 | - $plan = 'PRO'; | |
| 138 | - if ( in_array( $feature, $biz_features ) ) { | |
| 139 | - $plan = 'DEVELOPER'; | |
| 136 | + if ( empty( $feature ) || ( in_array( $feature, $biz_features, true ) && ! apply_filters( 'visualizer_is_business', false ) ) ) { | |
| 137 | + $msg = sprintf( __( 'Upgrade to %s to activate this feature!', 'visualizer' ), 'PRO' ); | |
| 138 | + if ( Visualizer_Module::is_pro() && in_array( $feature, $biz_features, true ) ) { | |
| 139 | + $msg = sprintf( __( 'Upgrade your license to at least the %s version to activate this feature!', 'visualizer' ), 'DEVELOPER' ); | |
| 140 | 140 | } |
| 141 | 141 | $return = '<div class="only-pro-content">'; |
| 142 | 142 | $return .= ' <div class="only-pro-container">'; |
| 143 | 143 | $return .= ' <div class="only-pro-inner">'; |
| 144 | - $return .= ' <p>' . sprintf( __( 'Enable this feature in %s version!', 'visualizer' ), $plan ) . '</p>'; | |
| 144 | + $return .= ' <p>' . $msg . '</p>'; | |
| 145 | 145 | $return .= ' <a target="_blank" href="' . Visualizer_Plugin::PRO_TEASER_URL . '" title="' . __( 'Buy now', 'visualizer' ) . '">' . __( 'Buy now', 'visualizer' ) . '</a>'; |
| 146 | 146 | $return .= ' </div>'; |
| 147 | 147 | $return .= ' </div>'; |
| 148 | 148 | $return .= '</div>'; |
| 149 | 149 | } |
| 150 | - if ( empty( $feature ) && defined( 'VISUALIZER_PRO_VERSION' ) ) { | |
| 150 | + if ( empty( $feature ) && Visualizer_Module::is_pro() ) { | |
| 151 | 151 | remove_filter( 'visualizer_pro_upsell', 'addProUpsell', 10, 1 ); |
| 152 | 152 | $return = ''; |
| 153 | 153 | } |
| 154 | 154 | |