PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.3.4
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.3.4
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 +8 -21 4.0.73.3.4 View file →
@@ -52,9 +52,9 @@
52 52 public function __construct( Visualizer_Plugin $plugin ) {
53 53 parent::__construct( $plugin );
54 54 $this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_SERIES, 'filterChartSeries', 1, 2 );
55 55 $this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_DATA, 'filterChartData', 1, 2 );
56 - $this->_addFilter( 'visualizer_pro_upsell', 'addProUpsell', 10, 3 );
56 + $this->_addFilter( 'visualizer_pro_upsell', 'addProUpsell', 10, 2 );
57 57 }
58 58
59 59 /**
60 60 * Filters chart sereis.
@@ -128,36 +128,22 @@
128 128 * @param string $feature What feature is this filter running for.
129 129 *
130 130 * @return string The new html code.
131 131 */
132 - public function addProUpsell( $old, $feature = null, string $docs_url = '' ) {
133 - $pro_features = Visualizer_Module::get_features_for_license( 1 );
134 - $biz_features = Visualizer_Module::get_features_for_license( 2 );
132 + public function addProUpsell( $old, $feature = null ) {
133 + $biz_features = array( 'schedule-chart', 'chart-permissions', 'db-query' );
135 134 $return = '';
136 135 $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 - // translators: $s - the name of the plan (PRO).
136 + if ( empty( $feature ) || ( in_array( $feature, $biz_features, true ) && ! apply_filters( 'visualizer_is_business', false ) ) ) {
142 137 $msg = sprintf( __( 'Upgrade to %s to activate this feature!', 'visualizer' ), 'PRO' );
143 - // translators: $s - the name of the plan (Plus).
144 - $plus_msg = sprintf( __( 'Upgrade to %s plan to activate this feature!', 'visualizer' ), 'Plus' );
145 - if ( in_array( $feature, $biz_features, true ) && Visualizer_Module::is_pro() ) {
146 - $msg = $plus_msg;
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' );
147 140 }
148 - if ( in_array( $feature, array( 'db-query', 'chart-permissions' ), true ) ) {
149 - $msg = $plus_msg;
150 - }
151 -
152 141 $return = '<div class="only-pro-content">';
153 142 $return .= ' <div class="only-pro-container">';
154 143 $return .= ' <div class="only-pro-inner">';
155 144 $return .= ' <p>' . $msg . '</p>';
156 - if ( ! empty( $docs_url ) ) {
157 - $return .= ' <a target="_blank" href="' . esc_url( $docs_url ) . '" class="button button-secondary">' . esc_html__( 'Documentation', 'visualizer' ) . '</a>';
158 - }
159 - $return .= ' <a target="_blank" href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, esc_attr( $feature ) ) . '" title="' . __( 'Upgrade Now', 'visualizer' ) . '" class="button button-primary">' . __( 'Upgrade Now', 'visualizer' ) . '</a>';
145 + $return .= ' <a target="_blank" href="' . Visualizer_Plugin::PRO_TEASER_URL . '" title="' . __( 'Buy now', 'visualizer' ) . '">' . __( 'Buy now', 'visualizer' ) . '</a>';
160 146 $return .= ' </div>';
161 147 $return .= ' </div>';
162 148 $return .= '</div>';
163 149 }
@@ -167,5 +153,6 @@
167 153 }
168 154
169 155 return $return;
170 156 }
157 +
171 158 }