Skip to content

Commit a7c06af

Browse files
committed
fixed issue with plans.
1 parent 7409bbc commit a7c06af

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

classes/Visualizer/Module/Sources.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// +----------------------------------------------------------------------+
1919
// | Author: Eugene Manuilov <[email protected]> |
2020
// +----------------------------------------------------------------------+
21+
2122
/**
2223
* Sources module class.
2324
*
@@ -130,8 +131,9 @@ public function filterChartData( $data, $chart_id ) {
130131
* @return string The new html code.
131132
*/
132133
public function addProUpsell( $old, $feature = null ) {
133-
$return = '';
134-
if ( ! $feature || ( $feature == 'schedule-chart' && ! apply_filters( 'visualizer_is_business', false ) ) ) {
134+
$return = '';
135+
$feature = strval( $feature );
136+
if ( empty( $feature ) || ( $feature == 'schedule-chart' && ! apply_filters( 'visualizer_is_business', false ) ) ) {
135137
$plan = 'PRO';
136138
if ( $feature === 'schedule-chart' ) {
137139
$plan = 'BUSINESS';
@@ -145,7 +147,7 @@ public function addProUpsell( $old, $feature = null ) {
145147
$return .= ' </div>';
146148
$return .= '</div>';
147149
}
148-
if ( ! $feature && defined( 'Visualizer_Pro' ) ) {
150+
if ( empty( $feature ) && defined( 'VISUALIZER_PRO_VERSION' ) ) {
149151
remove_filter( 'visualizer_pro_upsell', 'addProUpsell', 10, 1 );
150152
$return = '';
151153
}

classes/Visualizer/Render/Page/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class="dashicons dashicons-lock"></span></h2>
170170

171171
$query_args_charts = array(
172172
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
173-
'posts_per_page' => -1,
173+
'posts_per_page' => 300,
174174
'no_found_rows' => true,
175175
);
176176
$charts = array();

0 commit comments

Comments
 (0)