PluginProbe ʕ •ᴥ•ʔ
Strong Testimonials / 3.3.2
Strong Testimonials v3.3.2
3.3.2 3.3.1 trunk 1.0.1 2.30.9 2.31.10 2.32 2.32.1 2.32.2 2.32.3 2.32.4 2.33 2.34 2.35 2.36 2.37 2.38 2.38.1 2.39 2.39.1 2.39.2 2.39.3 2.40.0 2.40.1 2.40.2 2.40.3 2.40.4 2.40.5 2.40.6 2.40.7 2.41.0 2.41.1 2.50.0 2.50.1 2.50.2 2.50.3 2.50.4 2.51.0 2.51.1 2.51.2 2.51.3 2.51.4 2.51.5 2.51.6 2.51.7 2.51.8 2.51.9 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0
strong-testimonials / admin / class-strong-testimonials-upsell.php
strong-testimonials / admin Last commit date
challenge 1 year ago css 1 week ago img 1 year ago js 1 month ago menu 1 month ago partials 2 weeks ago rest-api 1 week ago scss 1 year ago settings 1 week ago uninstall 1 year ago wpchill 1 month ago admin-notices.php 6 months ago admin.php 1 month ago class-strong-testimonials-addons.php 1 month ago class-strong-testimonials-admin-category-list.php 1 year ago class-strong-testimonials-admin-list.php 1 year ago class-strong-testimonials-admin-scripts.php 1 month ago class-strong-testimonials-admin.php 1 month ago class-strong-testimonials-debug.php 6 months ago class-strong-testimonials-exporter.php 1 year ago class-strong-testimonials-help.php 1 year ago class-strong-testimonials-helper.php 1 month ago class-strong-testimonials-list-table.php 1 year ago class-strong-testimonials-lite-vs-pro-page.php 1 month ago class-strong-testimonials-post-editor.php 7 months ago class-strong-testimonials-review.php 1 year ago class-strong-testimonials-updater.php 1 month ago class-strong-testimonials-upsell.php 1 week ago class-strong-views-list-table.php 1 month ago class-walker-strong-category-checklist.php 1 year ago class-walker-strong-form-category-checklist.php 1 year ago class-wpmtst-onboarding.php 1 year ago compat.php 1 year ago custom-fields-ajax.php 1 year ago custom-fields.php 1 week ago form-preview.php 1 year ago view-list-order.php 1 year ago views-ajax.php 1 month ago views-validate.php 1 year ago views.php 1 month ago
class-strong-testimonials-upsell.php
698 lines
1 <?php
2 /**
3 * Class Strong_Testimonials_Upsell
4 *
5 * @since 2.38
6 */
7 class Strong_Testimonials_Upsell {
8
9 /**
10 * Holds the upsells object
11 *
12 * @var bool
13 */
14 private $extensions = false;
15
16 public $store_upgrade_url;
17
18 public function __construct() {
19 $this->set_store_upgrade_url();
20 $options = get_option( 'wpmtst_options' );
21
22 if ( apply_filters( 'wpmtst_disable_upsells', false ) ) {
23 return;
24 }
25
26 require_once WPMTST_ADMIN . 'rest-api/class-strong-testimonials-extensions-base.php';
27 $this->extensions = Strong_Testimonials_Extensions_Base::get_instance();
28
29 add_action( 'wpmtst_admin_after_settings_form', array( $this, 'general_upsell' ) );
30 add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
31
32 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-role-management' ) ) {
33 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_role_upsell' ), 20 );
34 }
35
36 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-country-selector' ) ) {
37 add_action( 'wpmtst_after_form_type_selection', array( $this, 'output_country_selector_upsell' ) );
38 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_country_selector_upsell' ), 95 );
39 }
40
41 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-custom-fields' ) ) {
42 add_action( 'wpmtst_after_form_type_selection', array( $this, 'output_custom_fields_upsell' ) );
43 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_custom_fields_upsell' ), 90 );
44 }
45
46 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-multiple-forms' ) ) {
47 add_action( 'wpmtst_fields_editor_upsell_col', array( $this, 'output_multiple_form_upsell' ) );
48 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_multiple_form_upsell' ), 30 );
49 }
50
51 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-review-markup' ) ) {
52 add_action( 'wpmtst_view_editor_after_groups', array( $this, 'output_review_markup_upsell' ) );
53 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_review_markup_upsell' ), 15 );
54 }
55
56 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-advanced-views' ) ) {
57 add_action( 'wpmtst_view_editor_after_group_select', array( $this, 'output_advanced_views_upsell' ) );
58 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_advanced_views_upsell' ), 35 );
59 }
60
61 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-captcha' ) ) {
62 add_action( 'wpmtst_fields_editor_upsell_col', array( $this, 'output_captcha_editor_upsell' ) );
63 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_captcha_upsell' ), 40 );
64 }
65
66 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-video' ) ) {
67 add_action( 'wpmtst_fields_editor_upsell_col', array( $this, 'output_video_upsell' ) );
68 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_video_upsell' ), 12 );
69 }
70
71 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-pro-templates' ) ) {
72 add_action( 'wpmtst_views_after_template_list', array( $this, 'output_pro_templates_upsell' ) );
73 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_pro_templates_upsell' ), 20 );
74 }
75
76 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-emails' ) ) {
77 add_action( 'wpmtst_after_mail_notification_settings', array( $this, 'output_enhanced_emails_upsell' ) );
78 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_enhanced_emails_upsell' ), 45 );
79 }
80
81 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-infinite-scroll' ) ) {
82 add_action( 'wpmtst_view_editor_pagination_row_end', array( $this, 'output_infinite_scroll_upsell' ) );
83 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_infinite_scroll_upsell' ), 50 );
84 }
85
86 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-filters' ) ) {
87 add_action( 'wpmtst_after_style_view_section', array( $this, 'output_filters_upsell' ) );
88 add_filter( 'wpmtst_general_upsell_items', array( $this, 'add_filters_upsell' ), 15 );
89 }
90
91 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-mailchimp' ) ) {
92 add_action( 'wpmtst_after_form_settings', array( $this, 'output_mailchip_form_settings_upsell' ) );
93 }
94 }
95
96 /**
97 * Get upsell button HTML with filterable output.
98 *
99 * @param string $url The button URL.
100 * @param string $context The upsell context identifier.
101 * @param string $text The button text. Default 'Upgrade'.
102 *
103 * @return string
104 * @since 3.3.0
105 */
106 public function get_upsell_button( $url, $context, $text = '' ) {
107 if ( empty( $text ) ) {
108 $text = __( 'Upgrade', 'strong-testimonials' );
109 }
110 $text = esc_html( apply_filters( 'wpmtst_upsells_button_text', $text ) );
111 $button = '<a class="button button-primary" target="_blank" href="' . esc_url( $url ) . '">' . $text . '</a>';
112
113 return apply_filters( 'wpmtst_upsell_buttons', $button, $context );
114 }
115
116 public function add_meta_boxes() {
117
118 if ( $this->extensions->is_upgradable_addon( 'strong-testimonials-importer' ) ) {
119
120 // remove "submitdiv" metabox so we can add it back in desired order.
121 $post_type = 'wpm-testimonial';
122 remove_meta_box( 'post_submit_meta_box', $post_type, 'side' );
123 add_meta_box( 'submitdiv', __( 'Publish', 'strong-testimonials' ), 'post_submit_meta_box', $post_type, 'side', 'high' );
124
125 add_meta_box(
126 'wpmtst-importer-upsell', // Unique ID
127 esc_html__( 'Import', 'strong-testimonials' ), // Title
128 array( $this, 'output_importer_upsell' ), // Callback function
129 'wpm-testimonial', // Admin page (or post type)
130 'side', // Context
131 'high' // Priority
132 );
133 }
134 }
135
136 public function set_store_upgrade_url() {
137
138 $this->store_upgrade_url = WPMTST_STORE_UPGRADE_URL . '?utm_source=st-lite&utm_campaign=upsell';
139
140 //append license key
141 $license = trim( get_option( 'strong_testimonials_license_key' ) );
142 if ( $license ) {
143 $this->store_upgrade_url .= '&license=' . $license;
144 }
145 }
146
147 public function output_importer_upsell() {
148 ?>
149 <div class="wpmtst-alert">
150 <h2><?php esc_html_e( 'Automatically pull in & display new reviews as your customers leave their feedback on external platforms', 'strong-testimonials' ); ?></h2>
151 <p><?php esc_html_e( 'Upgrade today and get the ability to import testimonials from:', 'strong-testimonials' ); ?></p>
152 <ul>
153 <li><?php esc_html_e( 'Facebook', 'strong-testimonials' ); ?></li>
154 <li><?php esc_html_e( 'Google', 'strong-testimonials' ); ?></li>
155 <li><?php esc_html_e( 'Yelp', 'strong-testimonials' ); ?></li>
156 <li><?php esc_html_e( 'Zomato', 'strong-testimonials' ); ?></li>
157 <li><?php esc_html_e( 'WooCommerce', 'strong-testimonials' ); ?></li>
158 <li><?php esc_html_e( 'and more...', 'strong-testimonials' ); ?></li>
159 </ul>
160 <p>
161 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=importer-metabox', 'importer-metabox', __( 'Upgrade Now', 'strong-testimonials' ) ); ?>
162 </p>
163 </div>
164 <?php
165 }
166
167 public function general_upsell() {
168
169 $general_upsells = apply_filters( 'wpmtst_general_upsell_items', array() );
170
171 if ( ! empty( $general_upsells ) ) {
172
173 ?>
174
175 <div class="wpmtst-settings-upsell">
176 <div class="wpmtst-alert">
177 <h3><?php esc_html_e( 'Upgrade now', 'strong-testimonials' ); ?></h3>
178 <ul>
179 <?php foreach ( $general_upsells as $general_upsell ) { ?>
180 <li>
181 <span>
182 <?php echo wp_kses_post( $general_upsell ); ?>
183 </span>
184 </li>
185 <?php } ?>
186 </ul>
187
188 <?php
189 $button_url = WPMTST_STORE_URL . 'pricing?utm_source=st-lite&utm_campaign=upsell&utm_medium=general-settings-upsell';
190 $button_text = esc_html( apply_filters( 'wpmtst_upsells_button_text', __( 'Upgrade now', 'strong-testimonials' ) ) );
191 $button = '<a href="' . esc_url( $button_url ) . '" target="_blank" class="button button-primary button-hero" style="width:100%;display:block;margin-top:20px;text-align:center;">' . $button_text . '</a>';
192 echo apply_filters( 'wpmtst_upsell_buttons', $button, 'general-settings' );
193 ?>
194
195 </div>
196 </div>
197
198 <?php
199 }
200 }
201
202 public function add_role_upsell( $upsells ) {
203 $upsell = sprintf(
204 // translators: %s is a link to a Strong Testimonial extension page.
205 esc_html__( 'Control who approves testimonials or who has access to the plugins’ settings panel with %s extension. Get total granular control over who has access to your testimonials.', 'strong-testimonials' ),
206 sprintf(
207 '<a href="%s" target="_blank">%s</a>',
208 esc_url( WPMTST_STORE_URL . 'extensions/role-management?utm_source=st-lite&utm_campaign=upsell&utm_medium=role-management-general-upsell' ),
209 esc_html__( 'Role Management', 'strong-testimonials' )
210 )
211 );
212
213 $upsells[] = $upsell;
214 return $upsells;
215 }
216
217 /*
218 Country Selector
219 */
220 public function output_country_selector_upsell() {
221 ?>
222 <div class="wpmtst-alert" style="margin-top: 10px">
223 <?php esc_html_e( 'Want to know where are your customers located?', 'strong-testimonials' ); ?>
224 <br/>
225 <?php
226 printf(
227 // translators: %s is a link to a Strong Testimonial extension page.
228 esc_html__( 'Install the %s extension', 'strong-testimonials' ),
229 sprintf(
230 '<a href="%s" target="_blank">%s</a>',
231 esc_url( WPMTST_STORE_URL . 'extensions/country-selector?utm_source=st-lite&utm_campaign=upsell&utm_medium=fields-country-selector-upsell' ),
232 esc_html__( 'Strong Testimonials: Country Selector', 'strong-testimonials' )
233 )
234 );
235 ?>
236 <p>
237
238 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=fields-country-selector-upsell', 'country-selector' ); ?>
239 </p>
240 </div>
241 <?php
242 }
243
244 public function add_country_selector_upsell( $upsells ) {
245 $upsell = sprintf(
246 // translators: %s is a link to a Strong Testimonials extension page.
247 esc_html__( 'Show where your customers are located with the %s extension. ', 'strong-testimonials' ),
248 sprintf(
249 '<a href="%s" target="_blank">%s</a>',
250 esc_url( WPMTST_STORE_URL . 'extensions/country-selector?utm_source=st-lite&utm_campaign=upsell&utm_medium=country-selector-general-upsell' ),
251 esc_html__( 'Country Selector', 'strong-testimonials' )
252 )
253 );
254
255 $upsells[] = $upsell;
256 return $upsells;
257 }
258
259 /*
260 Custom fields
261 */
262 public function output_custom_fields_upsell() {
263 ?>
264 <div class="wpmtst-alert" style="margin-top: 10px">
265 <?php esc_html_e( 'Know your customers by having access to more advanced custom fields.', 'strong-testimonials' ); ?>
266 <br/>
267 <?php
268 printf(
269 // translators: %s is a link to a Strong Testimonials extension page.
270 esc_html__( 'Install the %s extension', 'strong-testimonials' ),
271 sprintf(
272 '<a href="%s" target="_blank">%s</a>',
273 esc_url( WPMTST_STORE_URL . 'extensions/custom-fields?utm_source=st-lite&utm_campaign=upsell&utm_medium=fields-custom-fields-upsell' ),
274 esc_html__( 'Strong Testimonials: Custom Fields', 'strong-testimonials' )
275 )
276 );
277 ?>
278 <p>
279
280 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=fields-custom-fields-upsell', 'custom-fields' ); ?>
281 </p>
282 </div>
283 <?php
284 }
285
286 public function add_custom_fields_upsell( $upsells ) {
287 $upsell = sprintf(
288 // translators: %s is a link to a Strong Testimonials extension page.
289 esc_html__( 'Get to know your customers by installing our %s extension.', 'strong-testimonials' ),
290 sprintf(
291 '<a href="%s" target="_blank">%s</a>',
292 esc_url( WPMTST_STORE_URL . 'extensions/custom-fields?utm_source=st-lite&utm_campaign=upsell&utm_medium=custom-fields-general-upsell' ),
293 esc_html__( 'Custom Fields', 'strong-testimonials' )
294 )
295 );
296
297 $upsells[] = $upsell;
298 return $upsells;
299 }
300
301 /*
302 * Multiple forms
303 */
304 public function output_multiple_form_upsell() {
305 ?>
306 <div class="wpmtst-alert" style="margin-top: 10px">
307 <?php
308 printf(
309 // translators: %s is a link to a Strong Testimonials extension page.
310 esc_html__( 'Create multiple submission forms by installing the %s extension.', 'strong-testimonials' ),
311 sprintf(
312 '<a href="%s" target="_blank">%s</a>',
313 esc_url( WPMTST_STORE_URL . 'extensions/multiple-forms?utm_source=st-lite&utm_campaign=upsell&utm_medium=fields-multiple-forms-upsell' ),
314 esc_html__( 'Strong Testimonials: Multiple Forms', 'strong-testimonials' )
315 )
316 );
317 ?>
318 <p>
319
320 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=fields-multiple-forms-upsell', 'multiple-forms' ); ?>
321 </p>
322 </div>
323 <?php
324 }
325
326 public function add_multiple_form_upsell( $upsells ) {
327 $upsell = sprintf(
328 // translators: %s is a link to a Strong Testimonials extension page.
329 esc_html__( 'Create multiple submission forms by installing the %s extension.', 'strong-testimonials' ),
330 sprintf(
331 '<a href="%s" target="_blank">%s</a>',
332 esc_url( WPMTST_STORE_URL . 'extensions/multiple-forms?utm_source=st-lite&utm_campaign=upsell&utm_medium=multiple-forms-general-upsell' ),
333 esc_html__( 'Multiple Forms', 'strong-testimonials' )
334 )
335 );
336
337 $upsells[] = $upsell;
338 return $upsells;
339 }
340
341 /*
342 * Review Markup
343 */
344 public function output_review_markup_upsell() {
345 ?>
346 <div class="wpmtst-alert" style="margin-top: 10px">
347 <?php
348 printf(
349 // translators: %s is a link to a Strong Testimonials extension page.
350 esc_html__( 'Add SEO-friendly & Schema.org compliant Testimonials with our %s extension.', 'strong-testimonials' ),
351 sprintf(
352 '<a href="%s" target="_blank">%s</a>',
353 esc_url( WPMTST_STORE_URL . 'extensions/review-markup?utm_source=st-lite&utm_campaign=upsell&utm_medium=views-review-markup-upsell' ),
354 esc_html__( 'Strong Testimonials: Review Markup', 'strong-testimonials' )
355 )
356 );
357 ?>
358 <ul>
359 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'With this extensions, search engines will display star ratings in search results for your site.', 'strong-testimonials' ); ?></li>
360 </ul>
361 <p>
362 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=views-review-markup-upsell', 'review-markup' ); ?>
363 </p>
364 </div>
365 <?php
366 }
367
368 public function add_review_markup_upsell( $upsells ) {
369 $upsell = sprintf(
370 // translators: %s is a link to a Strong Testimonials extension page.
371 esc_html__( 'Add SEO-friendly & Schema.org compliant Testimonials with our %s extension.', 'strong-testimonials' ),
372 sprintf(
373 '<a href="%s" target="_blank">%s</a>',
374 esc_url( WPMTST_STORE_URL . 'extensions/review-markup?utm_source=st-lite&utm_campaign=upsell&utm_medium=review-markup-general-upsell' ),
375 esc_html__( 'Review Markup', 'strong-testimonials' )
376 )
377 );
378
379 $upsells[] = $upsell;
380 return $upsells;
381 }
382
383 /*
384 Advanced Views
385 */
386 public function output_advanced_views_upsell() {
387 ?>
388 <div class="wpmtst-alert" style="margin-top: 1.5rem">
389 <?php
390 printf(
391 // translators: %s is a link to a Strong Testimonials extension page.
392 esc_html__( 'With the %s extension you can:', 'strong-testimonials' ),
393 sprintf(
394 '<a href="%s" target="_blank">%s</a>',
395 esc_url( WPMTST_STORE_URL . 'extensions/advanced-views?utm_source=st-lite&utm_campaign=upsell&utm_medium=views-advanced-views-upsell' ),
396 esc_html__( 'Strong Testimonials: Advanced Views', 'strong-testimonials' )
397 )
398 );
399
400 ?>
401 <ul>
402 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'filter & display testimonials based on their rating or on a pre-defined condition.', 'strong-testimonials' ); ?></li>
403 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'easily define the display order of your testimonial fields. Re-order the name, image, url and testimonial content fields through drag & drop.', 'strong-testimonials' ); ?></li>
404 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'edit, in real time, the way your testimonials will look on your site. Stop losing clients because of poor design.', 'strong-testimonials' ); ?></li>
405
406 </ul>
407 <p>
408
409 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=views-advanced-views-upsell', 'advanced-views' ); ?>
410 </p>
411 </div>
412 <?php
413 }
414
415 public function add_advanced_views_upsell( $upsells ) {
416 $upsell = sprintf(
417 // translators: %s is a link to a Strong Testimonials extension page.
418 esc_html__( 'Start filtering, changing the order, or even editing your testimonials in real-time with the %s extension.', 'strong-testimonials' ),
419 sprintf(
420 '<a href="%s" target="_blank">%s</a>',
421 esc_url( WPMTST_STORE_URL . 'extensions/advanced-views?utm_source=st-lite&utm_campaign=upsell&utm_medium=advanced-views-general-upsell' ),
422 esc_html__( 'Advanced Views', 'strong-testimonials' )
423 )
424 );
425
426 $upsells[] = $upsell;
427 return $upsells;
428 }
429
430 /*
431 Captcha extensio
432 */
433 public function output_captcha_editor_upsell() {
434 ?>
435 <div class="wpmtst-alert" style="margin-top: 10px">
436 <?php
437 printf(
438 // translators: %s is a link to a Strong Testimonials extension page.
439 esc_html__( 'Protect your form against spam with the %s extension.', 'strong-testimonials' ),
440 sprintf(
441 '<a href="%s" target="_blank">%s</a>',
442 esc_url( WPMTST_STORE_URL . 'extensions/captcha?utm_source=st-lite&utm_campaign=upsell&utm_medium=form-settings-upsell' ),
443 esc_html__( 'Strong Testimonials: Captcha', 'strong-testimonials' )
444 )
445 );
446 ?>
447 <p>
448 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=form-settings-captcha-upsell', 'captcha-editor' ); ?>
449 </p>
450 </div>
451 <?php
452 }
453
454 public function add_captcha_upsell( $upsells ) {
455 $upsell = sprintf(
456 // translators: %s is a link to a Strong Testimonials extension page.
457 esc_html__( 'Protect your form against spam. Add Google ReCaptcha or honeypot anti-spam with the %s extension.', 'strong-testimonials' ),
458 sprintf(
459 '<a href="%s" target="_blank">%s</a>',
460 esc_url( WPMTST_STORE_URL . 'extensions/captcha?utm_source=st-lite&utm_campaign=upsell&utm_medium=form-settings-captcha-general-upsell' ),
461 esc_html__( 'Captcha', 'strong-testimonials' )
462 )
463 );
464
465 $upsells[] = $upsell;
466 return $upsells;
467 }
468
469 /*
470 Video
471 */
472 public function output_video_upsell() {
473 ?>
474 <div class="wpmtst-alert" style="margin-top: 10px">
475 <?php
476 printf(
477 // translators: %s is a link to a Strong Testimonials extension page.
478 esc_html__( 'Collect authentic video testimonials directly from your customers and turn trust into conversions through the %s extension.', 'strong-testimonials' ),
479 sprintf(
480 '<a href="%s" target="_blank">%s</a>',
481 esc_url( WPMTST_STORE_URL . 'extensions/video?utm_source=st-lite&utm_campaign=upsell&utm_medium=fields-video-upsell' ),
482 esc_html__( 'Strong Testimonials: Video', 'strong-testimonials' )
483 )
484 );
485 ?>
486 <p>
487 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=fields-video-upsell', 'video' ); ?>
488 </p>
489 </div>
490 <?php
491 }
492
493
494 public function add_video_upsell( $upsells ) {
495 $upsell = sprintf(
496 // translators: %s is a link to a Strong Testimonials extension page.
497 esc_html__( 'Video testimonials build more trust than text alone. Upgrade to %s and start collecting authentic customer videos in minutes.', 'strong-testimonials' ),
498 sprintf(
499 '<a href="%s" target="_blank">%s</a>',
500 esc_url( WPMTST_STORE_URL . 'extensions/video?utm_source=st-lite&utm_campaign=upsell&utm_medium=video-general-upsell' ),
501 esc_html__( 'Strong Testimonials Video', 'strong-testimonials' )
502 )
503 );
504
505 $upsells[] = $upsell;
506 return $upsells;
507 }
508
509 /*
510 PRO Templates
511 */
512 public function output_pro_templates_upsell() {
513 ?>
514 <div class="wpmtst-alert">
515 <?php
516 echo wp_kses_post( sprintf( __( 'With the %1$sStrong Testimonials: PRO Templates%2$s you can impress your potential clients with profesionally designed, pixel-perfect templates that increase your chances of standing out and landing more clients.', 'strong-testimonials' ), '<a href="' . WPMTST_STORE_URL . 'extensions/pro-templates/" target="_blank">', '</a>' ) );
517 ?>
518 <p>
519 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=views-pro-templates-upsell', 'pro-templates' ); ?>
520 </p>
521 </div>
522 <?php
523 }
524
525 public function add_pro_templates_upsell( $upsells ) {
526 $upsell = sprintf(
527 // translators: %s is a link to a Strong Testimonials extension page.
528 esc_html__( 'Get access to professionally designed testimonial templates with the %s extension.', 'strong-testimonials' ),
529 sprintf(
530 '<a href="%s" target="_blank">%s</a>',
531 esc_url( WPMTST_STORE_URL . 'extensions/pro-templates?utm_source=st-lite&utm_campaign=upsell&utm_medium=pro-templates-general-upsell' ),
532 esc_html__( 'Pro Templates', 'strong-testimonials' )
533 )
534 );
535
536 $upsells[] = $upsell;
537 return $upsells;
538 }
539
540 /*
541 Enhanced Emails
542 */
543 public function output_enhanced_emails_upsell() {
544 ?>
545 <div class="wpmtst-alert" style="margin-top: 10px">
546 <?php
547 printf(
548 // translators: %s is a link to a Strong Testimonials extension page.
549 esc_html__( 'Use the %s extension to:', 'strong-testimonials' ),
550 sprintf(
551 '<a href="%s" target="_blank">%s</a>',
552 esc_url( WPMTST_STORE_URL . 'extensions/enhanced-emails?utm_source=st-lite&utm_campaign=upsell&utm_medium=enhanced-emails-upsell' ),
553 esc_html__( 'Strong Testimonials: Enhanced Emails', 'strong-testimonials' )
554 )
555 );
556 ?>
557 <ul>
558 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'send a thank you email to your client once his testimonial\'s approved', 'strong-testimonials' ); ?></li>
559 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'increase brand loyalty by showing you really care about your clients', 'strong-testimonials' ); ?></li>
560 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'keep your clients engaged and increase your chances of selling more', 'strong-testimonials' ); ?></li>
561 </ul>
562 <p>
563 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=enhanced-emails-upsell', 'enhanced-emails' ); ?>
564 </p>
565 </div>
566 <?php
567 }
568
569 public function add_enhanced_emails_upsell( $upsells ) {
570 $upsell = sprintf(
571 // translators: %s is a link to a Strong Testimonials extension page.
572 esc_html__( 'Send a thank-you email to your clients once their testimonial is approved using %s extension. This way, you increase brand loyalty and grow your chances of seeling more. ', 'strong-testimonials' ),
573 sprintf(
574 '<a href="%s" target="_blank">%s</a>',
575 esc_url( WPMTST_STORE_URL . 'extensions/enhanced-emails?utm_source=st-lite&utm_campaign=upsell&utm_medium=enhanced-emails-general-upsell' ),
576 esc_html__( 'Enhanced Emails', 'strong-testimonials' )
577 )
578 );
579
580 $upsells[] = $upsell;
581 return $upsells;
582 }
583
584 /*
585 Inifinite Scroll
586 */
587 public function output_infinite_scroll_upsell() {
588 ?>
589 <div class="wpmtst-alert" style="margin-top: 10px">
590 <?php
591 printf(
592 // translators: %s is a link to a Strong Testimonials extension page.
593 esc_html__( 'With the %s extension you can:', 'strong-testimonials' ),
594 sprintf(
595 '<a href="%s" target="_blank">%s</a>',
596 esc_url( WPMTST_STORE_URL . 'extensions/infinite-scroll?utm_source=st-lite&utm_campaign=upsell&utm_medium=infinite-scroll-upsell' ),
597 esc_html__( 'Strong Testimonials: Infinite Scroll', 'strong-testimonials' )
598 )
599 );
600 ?>
601 <ul>
602 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'display a fixed number of testimonials on first view and have more of them load when the user starts scrolling', 'strong-testimonials' ); ?></li>
603 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'reduce your page\'s initial load time, making your site faster in the process and not driving clients away because of a slow loading website', 'strong-testimonials' ); ?></li>
604 </ul>
605 <p>
606 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=infinite-scroll-upsell', 'infinite-scroll' ); ?>
607 </p>
608 </div>
609 <?php
610 }
611
612 public function add_infinite_scroll_upsell( $upsells ) {
613 $upsell = sprintf(
614 // translators: %s is a link to a Strong Testimonials extension page.
615 esc_html__( 'Reduce your page’s initial load time - display a fixed number of testimonials on the first view and have more loading when you scroll down with %s extension.', 'strong-testimonials' ),
616 sprintf(
617 '<a href="%s" target="_blank">%s</a>',
618 esc_url( WPMTST_STORE_URL . 'extensions/infinite-scroll?utm_source=st-lite&utm_campaign=upsell&utm_medium=infinite-scroll-general-upsell' ),
619 esc_html__( 'Infinite Scroll', 'strong-testimonials' )
620 )
621 );
622
623 $upsells[] = $upsell;
624 return $upsells;
625 }
626
627 /*
628 Filters
629 */
630 public function output_filters_upsell() {
631 ?>
632 <div class="wpmtst-alert" style="margin-top:1.5rem;">
633 <?php
634 printf(
635 // translators: %s is a link to a Strong Testimonials extension page.
636 esc_html__( 'Use the %s extensions to:', 'strong-testimonials' ),
637 sprintf(
638 '<a href="%s" target="_blank">%s</a>',
639 esc_url( WPMTST_STORE_URL . 'extensions/filters?utm_source=st-lite&utm_campaign=upsell&utm_medium=views-filters-upsell' ),
640 esc_html__( 'Strong Testimonials: Filters', 'strong-testimonials' )
641 )
642 );
643 ?>
644 <ul>
645 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'create category-like filters for your testimonials', 'strong-testimonials' ); ?></li>
646 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'group testimonials by associated product or service', 'strong-testimonials' ); ?></li>
647 <li class="wpmtst-upsell-checkmark"><?php esc_html_e( 'help potential clients appreciate the great work you do by showcasing reviews from other clients', 'strong-testimonials' ); ?></li>
648 </ul>
649 <p>
650 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=filters-upsell', 'filters' ); ?>
651 </p>
652 </div>
653 <?php
654 }
655 public function add_filters_upsell( $upsells ) {
656 $upsell = sprintf(
657 // translators: %s is a link to a Strong Testimonials extension page.
658 esc_html__( 'Add category-like filters for testimonials, group testimonials by associated product/service, and help potential clients appreciate the great work you do by showcasing reviews from other clients with %s extension.', 'strong-testimonials' ),
659 sprintf(
660 '<a href="%s" target="_blank">%s</a>',
661 esc_url( WPMTST_STORE_URL . 'extensions/filters?utm_source=st-lite&utm_campaign=upsell&utm_medium=filters-general-upsell' ),
662 esc_html__( 'Filters', 'strong-testimonials' )
663 )
664 );
665
666 $upsells[] = $upsell;
667 return $upsells;
668 }
669
670 public function output_mailchip_form_settings_upsell() {
671 ?>
672 <hr>
673
674 <h3><?php esc_html_e( 'Mailchimp', 'strong-testimonials' ); ?></h3>
675
676 <div class="wpmtst-alert">
677 <?php
678 printf(
679 // translators: %s is a link to a Strong Testimonials extension page.
680 esc_html__( 'With this extension you can automatically subscribe your users to a MailChimp email list. Follow up with a targeted message or a coupon to thank them for leaving a good review. Unlock even more marketing & automation potential. ', 'strong-testimonials' ),
681 sprintf(
682 '<a href="%s" target="_blank">%s</a>',
683 esc_url( WPMTST_STORE_URL . 'extensions/mailchimp?utm_source=st-lite&utm_campaign=upsell&utm_medium=form-settings-upsell' ),
684 esc_html__( 'Strong Testimonials: Captcha', 'strong-testimonials' )
685 )
686 );
687 ?>
688 <p>
689 <?php echo $this->get_upsell_button( $this->store_upgrade_url . '&utm_medium=form-settings-captcha-upsell', 'mailchimp' ); ?>
690 </p>
691 </div>
692 <?php
693 }
694 }
695
696
697 new Strong_Testimonials_Upsell();
698