PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 5.0.1
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v5.0.1
5.0.1 4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 All 39 releases
← All changes | freemius/templates/account.php +102 -66 1.3.3 → 5.0.1 View file →
@@ -20,9 +20,11 @@
20 20
21 21 /**
22 22 * @var FS_Plugin_Tag $update
23 23 */
24 - $update = $fs->get_update( false, false, WP_FS__TIME_24_HOURS_IN_SEC / 24 );
24 + $update = $fs->has_release_on_freemius() ?
25 + $fs->get_update( false, false ) :
26 + null;
25 27
26 28 if ( is_object($update) ) {
27 29 /**
28 30 * This logic is particularly required for multisite environment.
@@ -43,8 +45,9 @@
43 45 $user = $fs->get_user();
44 46 $site = $fs->get_site();
45 47 $name = $user->get_name();
46 48 $license = $fs->_get_license();
49 + $is_license_foreign = ( is_object( $license ) && $user->id != $license->user_id );
47 50 $is_data_debug_mode = $fs->is_data_debug_mode();
48 51 $is_whitelabeled = $fs->is_whitelabeled();
49 52 $subscription = ( is_object( $license ) ?
50 53 $fs->_get_subscription( $license->id ) :
@@ -55,12 +58,21 @@
55 58 $has_paid_plan = $fs->apply_filters( 'has_paid_plan_account', $fs->has_paid_plan() );
56 59 $show_upgrade = ( ! $is_whitelabeled && $has_paid_plan && ! $is_paying && ! $is_paid_trial );
57 60 $trial_plan = $fs->get_trial_plan();
58 61
62 + $is_plan_change_supported = (
63 + ! $fs->is_single_plan() &&
64 + ! $fs->apply_filters( 'hide_plan_change', false )
65 + );
66 +
59 67 if ( $has_paid_plan ) {
60 68 $fs->_add_license_activation_dialog_box();
61 69 }
62 70
71 + if ( $fs->should_handle_user_change() ) {
72 + $fs->_add_email_address_update_dialog_box();
73 + }
74 +
63 75 $ids_of_installs_activated_with_foreign_licenses = $fs->should_handle_user_change() ?
64 76 $fs->get_installs_ids_with_foreign_licenses() :
65 77 array();
66 78
@@ -83,19 +95,18 @@
83 95 '_open_license_activation_dialog_box'
84 96 ) );
85 97 }
86 98
87 - $payments = $fs->_fetch_payments();
99 + $show_billing = ( ! $is_whitelabeled && ! $fs->apply_filters( 'hide_billing_and_payments_info', false ) );
100 + if ( $show_billing ) {
101 + $payments = $fs->_fetch_payments();
88 102
89 - $show_billing = ( ! $is_whitelabeled && is_array( $payments ) && 0 < count( $payments ) );
103 + $show_billing = ( is_array( $payments ) && 0 < count( $payments ) );
104 + }
90 105
91 106
92 - $has_tabs = $fs->_add_tabs_before_content();
107 + $has_tabs = $fs->_add_tabs_before_content();
93 108
94 - if ( $has_tabs ) {
95 - $query_params['tabs'] = 'true';
96 - }
97 -
98 109 // Aliases.
99 110 $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug );
100 111 $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
101 112 $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
@@ -137,8 +148,9 @@
137 148 $site_info = $fs->get_site_info( $s );
138 149 $install = $fs->get_install_by_blog_id( $site_info['blog_id'] );
139 150 $view_params = array(
140 151 'freemius' => $fs,
152 + 'user' => $fs->get_user(),
141 153 'license' => $license,
142 154 'site' => $site_info,
143 155 'install' => $install,
144 156 );
@@ -231,22 +243,32 @@
231 243
232 244 $addons_to_show = array_unique( array_merge( $installed_addons_ids, $account_addons ) );
233 245
234 246 $is_active_bundle_subscription = ( is_object( $bundle_subscription ) && $bundle_subscription->is_active() );
247 +
248 + $available_license = ( $fs->is_free_plan() && ! fs_is_network_admin() ) ?
249 + $fs->_get_available_premium_license( $site->is_localhost() ) :
250 + null;
251 +
252 + $available_license_paid_plan = is_object( $available_license ) ?
253 + $fs->_get_plan_by_id( $available_license->plan_id ) :
254 + null;
255 +
256 + $is_dev_mode = ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE );
235 257 ?>
236 258 <div class="wrap fs-section">
237 259 <?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?>
238 260 <h2 class="nav-tab-wrapper">
239 - <a href="<?php echo $fs->get_account_url() ?>"
261 + <a href="<?php echo esc_url( $fs->get_account_url() ) ?>"
240 262 class="nav-tab nav-tab-active"><?php fs_esc_html_echo_inline( 'Account', 'account', $slug ) ?></a>
241 263 <?php if ( $fs->has_addons() ) : ?>
242 - <a href="<?php echo $fs->_get_admin_page_url( 'addons' ) ?>"
264 + <a href="<?php echo esc_url( $fs->_get_admin_page_url( 'addons' ) ) ?>"
243 265 class="nav-tab"><?php echo esc_html( $addons_text ) ?></a>
244 266 <?php endif ?>
245 267 <?php if ( $show_upgrade ) : ?>
246 - <a href="<?php echo $fs->get_upgrade_url() ?>" class="nav-tab"><?php echo esc_html( $upgrade_text ) ?></a>
268 + <a href="<?php echo esc_url( $fs->get_upgrade_url() ) ?>" class="nav-tab"><?php echo esc_html( $upgrade_text ) ?></a>
247 269 <?php if ( $fs->apply_filters( 'show_trial', true ) && ! $fs->is_trial_utilized() && $fs->has_trial_plan() ) : ?>
248 - <a href="<?php echo $fs->get_trial_url() ?>" class="nav-tab"><?php fs_esc_html_echo_inline( 'Free Trial', 'free-trial', $slug ) ?></a>
270 + <a href="<?php echo esc_url( $fs->get_trial_url() ) ?>" class="nav-tab"><?php fs_esc_html_echo_inline( 'Free Trial', 'free-trial', $slug ) ?></a>
249 271 <?php endif ?>
250 272 <?php endif ?>
251 273 </h2>
252 274 <?php endif ?>
@@ -271,26 +293,21 @@
271 293 </li>
272 294 <li>&nbsp;&bull;&nbsp;</li>
273 295 <?php endif ?>
274 296 <?php if ( $show_billing ) : ?>
275 - <li><a href="#fs_billing"><i class="dashicons dashicons-portfolio"></i> <?php fs_esc_html_echo_inline( 'Billing & Invoices', 'billing-invoices', $slug ) ?></li>
297 + <li><a href="#fs_billing"><i class="dashicons dashicons-portfolio"></i> <?php fs_esc_html_echo_inline( 'Billing & Invoices', 'billing-invoices', $slug ) ?></a></li>
276 298 <li>&nbsp;&bull;&nbsp;</li>
277 299 <?php endif ?>
278 300 <?php if ( ! $is_whitelabeled ) : ?>
279 301 <?php if ( ! $is_paying ) : ?>
280 302 <li>
281 - <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
282 - <input type="hidden" name="fs_action" value="delete_account">
283 - <?php wp_nonce_field( 'delete_account' ) ?>
284 - <a class="fs-delete-account" href="#" onclick="if (confirm('<?php
285 - if ( $is_active_subscription ) {
286 - echo esc_attr( sprintf( fs_text_inline( 'Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the "Cancel" button, and first "Downgrade" your account. Are you sure you would like to continue with the deletion?', 'delete-account-x-confirm', $slug ), $plan->title ) );
287 - } else {
288 - echo esc_attr( sprintf( fs_text_inline( 'Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?', 'delete-account-confirm', $slug ), $fs->get_module_label( true ) ) );
289 - }
290 - ?>')) this.parentNode.submit(); return false;"><i
291 - class="dashicons dashicons-no"></i> <?php fs_esc_html_echo_inline( 'Delete Account', 'delete-account', $slug ) ?></a>
292 - </form>
303 + <?php
304 + $view_params = array(
305 + 'freemius' => $fs,
306 + 'license' => $available_license,
307 + 'license_paid_plan' => $available_license_paid_plan,
308 + );
309 + fs_require_template( 'account/partials/disconnect-button.php', $view_params ); ?>
293 310 </li>
294 311 <li>&nbsp;&bull;&nbsp;</li>
295 312 <?php endif ?>
296 313 <?php if ( $is_paying ) : ?>
@@ -295,9 +312,9 @@
295 312 <?php endif ?>
296 313 <?php if ( $is_paying ) : ?>
297 314 <?php if ( ! fs_is_network_admin() ) : ?>
298 315 <li>
299 - <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
316 + <form action="<?php echo esc_url( $fs->_get_admin_page_url( 'account' ) ) ?>" method="POST">
300 317 <input type="hidden" name="fs_action" value="deactivate_license">
301 318 <?php wp_nonce_field( 'deactivate_license' ) ?>
302 319 <a href="#" class="fs-deactivate-license"><i
303 320 class="dashicons dashicons-admin-network"></i> <?php fs_echo_inline( 'Deactivate License', 'deactivate-license', $slug ) ?>
@@ -309,15 +326,15 @@
309 326 <?php if ( ! $license->is_lifetime() &&
310 327 $is_active_subscription
311 328 ) : ?>
312 329 <li>
313 - <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
330 + <form action="<?php echo esc_url( $fs->_get_admin_page_url( 'account' ) ) ?>" method="POST">
314 331 <input type="hidden" name="fs_action" value="downgrade_account">
315 332 <?php wp_nonce_field( 'downgrade_account' ) ?>
316 333 <a href="#"
317 334 onclick="if ( confirm('<?php echo esc_attr( sprintf(
318 335 $downgrade_x_confirm_text,
319 - ( $fs->is_only_premium() ? $cancelling_subscription_text : $downgrading_plan_text ),
336 + ( $fs->is_only_premium() ? $cancelling_subscription_text : $downgrading_plan_text ),
320 337 $plan->title,
321 338 human_time_diff( time(), strtotime( $license->expiration ) )
322 339 ) ) ?> <?php if ( ! $license->is_block_features ) {
323 340 echo esc_attr( sprintf( $after_downgrade_non_blocking_text, $plan->title, $fs->get_module_label( true ) ) );
@@ -327,11 +344,11 @@
327 344 </form>
328 345 </li>
329 346 <li>&nbsp;&bull;&nbsp;</li>
330 347 <?php endif ?>
331 - <?php if ( ! $fs->is_single_plan() ) : ?>
348 + <?php if ( $is_plan_change_supported ) : ?>
332 349 <li>
333 - <a href="<?php echo $fs->get_upgrade_url() ?>"><i
350 + <a href="<?php echo esc_url( $fs->get_upgrade_url() ) ?>"><i
334 351 class="dashicons dashicons-grid-view"></i> <?php echo esc_html( $change_plan_text ) ?></a>
335 352 </li>
336 353 <li>&nbsp;&bull;&nbsp;</li>
337 354 <?php endif ?>
@@ -336,9 +353,9 @@
336 353 <li>&nbsp;&bull;&nbsp;</li>
337 354 <?php endif ?>
338 355 <?php elseif ( $is_paid_trial ) : ?>
339 356 <li>
340 - <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
357 + <form action="<?php echo esc_url( $fs->_get_admin_page_url( 'account' ) ) ?>" method="POST">
341 358 <input type="hidden" name="fs_action" value="cancel_trial">
342 359 <?php wp_nonce_field( 'cancel_trial' ) ?>
343 360 <a href="#" class="fs-cancel-trial"><i
344 361 class="dashicons dashicons-download"></i> <?php echo esc_html( $cancel_trial_text ) ?></a>
@@ -347,10 +364,10 @@
347 364 <li>&nbsp;&bull;&nbsp;</li>
348 365 <?php endif ?>
349 366 <?php endif ?>
350 367 <li>
351 - <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
352 - <input type="hidden" name="fs_action" value="<?php echo $fs->get_unique_affix() ?>_sync_license">
368 + <form action="<?php echo esc_url( $fs->_get_admin_page_url( 'account' ) ) ?>" method="POST">
369 + <input type="hidden" name="fs_action" value="<?php echo esc_attr( $fs->get_unique_affix() ) ?>_sync_license">
353 370 <?php wp_nonce_field( $fs->get_unique_affix() . '_sync_license' ) ?>
354 371 <a href="#" onclick="this.parentNode.submit(); return false;"><i
355 372 class="dashicons dashicons-image-rotate"></i> <?php fs_esc_html_echo_x_inline( 'Sync', 'as synchronize', 'sync', $slug ) ?></a>
356 373 </form>
@@ -363,9 +380,9 @@
363 380 $hide_license_key = ( ! $show_license_row || $fs->apply_filters( 'hide_license_key', false ) );
364 381
365 382 $profile = array();
366 383
367 - if ( ! $is_whitelabeled ) {
384 + if ( ! $is_whitelabeled ) {
368 385 $profile[] = array(
369 386 'id' => 'user_name',
370 387 'title' => fs_text_inline( 'Name', 'name', $slug ),
371 388 'value' => $name
@@ -432,13 +449,13 @@
432 449 'title' => $version_text,
433 450 'value' => $fs->get_plugin_version()
434 451 );
435 452
436 - if ( $is_premium && ! $is_whitelabeled ) {
453 + if ( ! fs_is_network_admin() && $is_premium ) {
437 454 $profile[] = array(
438 455 'id' => 'beta_program',
439 456 'title' => '',
440 - 'value' => $user->is_beta
457 + 'value' => $site->is_beta
441 458 );
442 459 }
443 460
444 461 if ( $has_paid_plan || $has_bundle_license ) {
@@ -492,11 +509,11 @@
492 509 // to show current plan.
493 510 continue;
494 511 }
495 512 ?>
496 - <tr class="fs-field-<?php echo $p['id'] ?><?php if ( $odd ) : ?> alternate<?php endif ?>">
513 + <tr class="fs-field-<?php echo esc_attr( $p['id'] ) ?><?php if ( $odd ) : ?> alternate<?php endif ?>">
497 514 <td>
498 - <nobr><?php echo $p['title'] ?><?php echo ( ! empty( $p['title'] ) ) ? ':' : '' ?></nobr>
515 + <nobr><?php echo esc_html( $p['title'] ) ?><?php echo ( ! empty( $p['title'] ) ) ? ':' : '' ?></nobr>
499 516 </td>
500 517 <td<?php if ( 'plan' === $p['id'] || 'bundle_plan' === $p['id'] ) { echo ' colspan="2"'; }?>>
501 518 <?php if ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
502 519 <code><?php echo FS_Plugin_License::mask_secret_key_for_html( $p['value'] ) ?></code>
@@ -534,17 +551,15 @@
534 551 <label class="fs-tag fs-warn"><?php echo esc_html( sprintf( $expires_in_text, human_time_diff( time(), strtotime( $site->trial_ends ) ) ) ) ?></label>
535 552 <?php endif ?>
536 553 <?php if ( ! $is_whitelabeled ) : ?>
537 554 <div class="button-group">
538 - <?php $available_license = $fs->is_free_plan() && ! fs_is_network_admin() ? $fs->_get_available_premium_license( $site->is_localhost() ) : false ?>
539 555 <?php if ( is_object( $available_license ) ) : ?>
540 - <?php $premium_plan = $fs->_get_plan_by_id( $available_license->plan_id ) ?>
541 556 <?php
542 557 $view_params = array(
543 558 'freemius' => $fs,
544 559 'slug' => $slug,
545 560 'license' => $available_license,
546 - 'plan' => $premium_plan,
561 + 'plan' => $available_license_paid_plan,
547 562 'is_localhost' => $site->is_localhost(),
548 563 'install_id' => $site->id,
549 564 'class' => 'button-primary',
550 565 );
@@ -549,20 +564,20 @@
549 564 'class' => 'button-primary',
550 565 );
551 566 fs_require_template( 'account/partials/activate-license-button.php', $view_params ); ?>
552 567 <?php else : ?>
553 - <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
568 + <form action="<?php echo esc_url( $fs->_get_admin_page_url( 'account' ) ) ?>"
554 569 method="POST" class="button-group">
555 570 <?php if ( $show_upgrade && $is_premium ) : ?>
556 - <a class="button activate-license-trigger <?php echo $fs->get_unique_affix() ?>" href="#"><?php fs_esc_html_echo_inline( 'Activate License', 'activate-license', $slug ) ?></a>
571 + <a class="button activate-license-trigger <?php echo esc_attr( $fs->get_unique_affix() ) ?>" href="#"><?php fs_esc_html_echo_inline( 'Activate License', 'activate-license', $slug ) ?></a>
557 572 <?php endif ?>
558 573 <input type="submit" class="button"
559 574 value="<?php echo esc_attr( $sync_license_text ) ?>">
560 575 <input type="hidden" name="fs_action"
561 - value="<?php echo $fs->get_unique_affix() ?>_sync_license">
576 + value="<?php echo esc_attr( $fs->get_unique_affix() ) ?>_sync_license">
562 577 <?php wp_nonce_field( $fs->get_unique_affix() . '_sync_license' ) ?>
563 - <?php if ( $show_upgrade || ! $fs->is_single_plan() ) : ?>
564 - <a href="<?php echo $fs->get_upgrade_url() ?>"
578 + <?php if ( $show_upgrade || $is_plan_change_supported ) : ?>
579 + <a href="<?php echo esc_url( $fs->get_upgrade_url() ) ?>"
565 580 class="button<?php
566 581 echo $show_upgrade ?
567 582 ' button-primary fs-upgrade' :
568 583 ' fs-change-plan'; ?> button-upgrade"><i
@@ -642,9 +657,9 @@
642 657 </div>
643 658 <?php endif ?>
644 659 <?php
645 660 elseif ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
646 - <?php if ( ! $is_whitelabeled ) : ?>
661 + <?php if ( ! $is_whitelabeled && ( 'site_secret_key' === $p['id'] || ! $is_license_foreign ) ) : ?>
647 662 <button class="button button-small fs-toggle-visibility"><?php fs_esc_html_echo_x_inline( 'Show', 'verb', 'show', $slug ) ?></button>
648 663 <?php endif ?>
649 664 <?php if ('license_key' === $p['id']) : ?>
650 665 <button class="button button-small activate-license-trigger <?php echo $fs->get_unique_affix() ?>"><?php fs_esc_html_echo_inline( 'Change License', 'change-license', $slug ) ?></button>
@@ -655,8 +670,9 @@
655 670 'email',
656 671 'user_name'
657 672 ) ) )
658 673 ) : ?>
674 + <?php if ( 'email' !== $p['id'] || ! fs_is_network_admin() ) : ?>
659 675 <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"
660 676 onsubmit="var val = prompt('<?php echo esc_attr( sprintf(
661 677 /* translators: %s: User's account property (e.g. name, email) */
662 678 fs_text_inline( 'What is your %s?', 'what-is-your-x', $slug ),
@@ -665,11 +681,12 @@
665 681 <input type="hidden" name="fs_action" value="update_<?php echo $p['id'] ?>">
666 682 <input type="hidden" name="fs_<?php echo $p['id'] ?>_<?php echo $fs->get_unique_affix() ?>"
667 683 value="">
668 684 <?php wp_nonce_field( 'update_' . $p['id'] ) ?>
669 - <input type="submit" class="button button-small"
685 + <input type="submit" class="button button-small <?php if ( 'email' === $p['id'] ) echo 'button-edit-email-address' ?>"
670 686 value="<?php echo fs_esc_attr_x_inline( 'Edit', 'verb', 'edit', $slug ) ?>">
671 687 </form>
688 + <?php endif ?>
672 689 <?php elseif ( 'user_id' === $p['id'] && ! empty( $ids_of_installs_activated_with_foreign_licenses ) ) : ?>
673 690 <input id="fs_change_user" type="submit" class="button button-small"
674 691 value="<?php echo fs_esc_attr_inline( 'Change User', 'change-user', $slug ) ?>">
675 692 <?php endif ?>
@@ -727,14 +744,32 @@
727 744 </div>
728 745 <div class="fs-table-body">
729 746 <table class="widefat">
730 747 <?php
748 + $current_blog_id = get_current_blog_id();
749 +
731 750 foreach ( $site_view_params as $view_params ) {
732 751 fs_require_template(
733 752 'account/partials/site.php',
734 753 $view_params
735 754 );
736 - } ?>
755 + }
756 +
757 + /**
758 + * It's possible for the `Freemius::switch_to_blog()` method to be called within the `site.php` template and this changes the Freemius instance's context, so this check is for restoring the previous context based on the previously retrieved site.
759 + *
760 + * @author Leo Fajardo (@leorw)
761 + * @since 2.5.0
762 + */
763 + $current_install = $fs->get_site();
764 +
765 + if (
766 + is_object( $site ) &&
767 + ( ! is_object( $current_install ) || $current_install->id != $site->id )
768 + ) {
769 + $fs->switch_to_blog( $current_blog_id, $site, true );
770 + }
771 + ?>
737 772 </table>
738 773 </div>
739 774 </div>
740 775 </div>
@@ -753,9 +788,9 @@
753 788 <th><?php echo esc_html( $version_text ) ?></th>
754 789 <th><?php echo esc_html( $plan_text ) ?></th>
755 790 <th><?php fs_esc_html_echo_x_inline( 'License', 'as software license', 'license', $slug ) ?></th>
756 791 <th></th>
757 - <?php if ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ) : ?>
792 + <?php if ( $is_dev_mode ) : ?>
758 793 <th></th>
759 794 <?php endif ?>
760 795 </tr>
761 796 </thead>
@@ -819,12 +854,22 @@
819 854 $fs->_get_addon_info( $addon_id, $is_addon_installed ),
820 855 'is_whitelabeled' => ( $is_whitelabeled && ! $is_data_debug_mode )
821 856 );
822 857
823 - fs_require_template(
824 - 'account/partials/addon.php',
825 - $addon_view_params
826 - );
858 + if ( ! empty($addon_view_params['addon_info'] ) ) {
859 + fs_require_template(
860 + 'account/partials/addon.php',
861 + $addon_view_params
862 + );
863 + } else {
864 + // If we are here it means there is an activation of an unreleased add-on and yet the SDK is not in development mode.
865 + echo '<tr>';
866 + echo '<td style="text-align: right;">' . esc_html( $addon_id ) . '</td>';
867 + echo '<td colspan="' . ( $is_dev_mode ? 6 : 5 ) . '" style="text-align: left;">';
868 + echo 'The add-on you have activated is no longer <a href="https://freemius.com/help/documentation/wordpress/selling-add-ons-extensions/#preparing-the-add-on-for-sale" rel="noreferrer noopener" target="_blank">listed</a> by the product owner, or the SDK is not running in <a href="https://freemius.com/help/documentation/wordpress-sdk/testing/" rel="noreferrer noopener" target="_blank">test mode</a>. Please <a href="' . esc_url( $fs->contact_url() ) . '">contact support</a> if you need further assistance.';
869 + echo '</td>';
870 + echo '</tr>';
871 + }
827 872
828 873 $odd = ! $odd;
829 874 } ?>
830 875 </tbody>
@@ -836,9 +881,9 @@
836 881 <?php $fs->do_action( 'after_account_details' ) ?>
837 882
838 883 <?php
839 884 if ( $show_billing ) {
840 - $view_params = array( 'id' => $VARS['id'] );
885 + $view_params = array( 'id' => $VARS['id'], 'payments' => $payments );
841 886 fs_require_once_template( 'account/billing.php', $view_params );
842 887 fs_require_once_template( 'account/payments.php', $view_params );
843 888 }
844 889 ?>
@@ -916,9 +961,9 @@
916 961 isChecked = $checkbox.is( ':checked' );
917 962
918 963 if ( ! isChecked || confirm( '<?php echo $confirmation_message ?>' ) ) {
919 964 $.ajax( {
920 - url : ajaxurl,
965 + url : <?php echo Freemius::ajax_url() ?>,
921 966 method: 'POST',
922 967 data : {
923 968 action : '<?php echo $fs->get_ajax_action( 'set_beta_mode' ) ?>',
924 969 security : '<?php echo $fs->get_ajax_security( 'set_beta_mode' ) ?>',
@@ -1059,9 +1104,9 @@
1059 1104 $( '.fs-toggle-whitelabel-mode' ).click( function () {
1060 1105 var $toggleLink = $( this );
1061 1106
1062 1107 $.ajax( {
1063 - url : ajaxurl,
1108 + url : <?php echo Freemius::ajax_url() ?>,
1064 1109 method: 'POST',
1065 1110 data : {
1066 1111 action : '<?php echo $fs->get_ajax_action( 'toggle_whitelabel_mode' ) ?>',
1067 1112 security : '<?php echo $fs->get_ajax_security( 'toggle_whitelabel_mode' ) ?>',
@@ -1084,13 +1129,4 @@
1084 1129 <?php
1085 1130 if ( $has_tabs ) {
1086 1131 $fs->_add_tabs_after_content();
1087 1132 }
1088 -
1089 - $params = array(
1090 - 'page' => 'account',
1091 - 'module_id' => $fs->get_id(),
1092 - 'module_type' => $fs->get_module_type(),
1093 - 'module_slug' => $slug,
1094 - 'module_version' => $fs->get_plugin_version(),
1095 - );
1096 - fs_require_template( 'powered-by.php', $params );