PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 2.0.3
Visualizer – Tables & Charts Manager with Built-in AI Generator v2.0.3
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | classes/Visualizer/Module/Sources.php +7 -12 3.10.02.0.3 View file →
@@ -129,30 +129,25 @@
129 129 *
130 130 * @return string The new html code.
131 131 */
132 132 public function addProUpsell( $old, $feature = null ) {
133 - $pro_features = Visualizer_Module::get_features_for_license( 1 );
134 - $biz_features = Visualizer_Module::get_features_for_license( 2 );
135 133 $return = '';
136 134 $feature = strval( $feature );
137 - if ( empty( $feature ) ||
138 - ( in_array( $feature, $biz_features, true ) && ! apply_filters( 'visualizer_is_business', false ) ) ||
139 - ( in_array( $feature, $pro_features, true ) && ! Visualizer_Module::is_pro() )
140 - ) {
141 - $msg = sprintf( __( 'Upgrade to %s to activate this feature!', 'visualizer' ), 'PRO' );
142 - if ( Visualizer_Module::is_pro() && in_array( $feature, $biz_features, true ) ) {
143 - $msg = sprintf( __( 'Upgrade your license to at least the %s version to activate this feature!', 'visualizer' ), 'DEVELOPER' );
135 + if ( empty( $feature ) || ( $feature == 'schedule-chart' && ! apply_filters( 'visualizer_is_business', false ) ) ) {
136 + $plan = 'PRO';
137 + if ( $feature === 'schedule-chart' ) {
138 + $plan = 'BUSINESS';
144 139 }
145 140 $return = '<div class="only-pro-content">';
146 141 $return .= ' <div class="only-pro-container">';
147 142 $return .= ' <div class="only-pro-inner">';
148 - $return .= ' <p>' . $msg . '</p>';
149 - $return .= ' <a target="_blank" href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, esc_attr( $feature ) ) . '" title="' . __( 'Buy now', 'visualizer' ) . '">' . __( 'Buy now', 'visualizer' ) . '</a>';
143 + $return .= ' <p>' . sprintf( __( 'Enable this feature in %s version!', 'visualizer' ), $plan ) . '</p>';
144 + $return .= ' <a target="_blank" href="' . Visualizer_Plugin::PRO_TEASER_URL . '" title="' . __( 'Buy now', 'visualizer' ) . '">' . __( 'Buy now', 'visualizer' ) . '</a>';
150 145 $return .= ' </div>';
151 146 $return .= ' </div>';
152 147 $return .= '</div>';
153 148 }
154 - if ( empty( $feature ) && Visualizer_Module::is_pro() ) {
149 + if ( empty( $feature ) && defined( 'VISUALIZER_PRO_VERSION' ) ) {
155 150 remove_filter( 'visualizer_pro_upsell', 'addProUpsell', 10, 1 );
156 151 $return = '';
157 152 }
158 153