|
252 | 252 | $available_license_paid_plan = is_object( $available_license ) ? |
253 | 253 | $fs->_get_plan_by_id( $available_license->plan_id ) : |
254 | 254 | null; |
| 255 | + |
| 256 | + $is_dev_mode = ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ); |
255 | 257 | ?> |
256 | 258 | <div class="wrap fs-section"> |
257 | 259 | <?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?> |
@@ -787,7 +789,7 @@ class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>" |
787 | 789 | <th><?php echo esc_html( $plan_text ) ?></th> |
788 | 790 | <th><?php fs_esc_html_echo_x_inline( 'License', 'as software license', 'license', $slug ) ?></th> |
789 | 791 | <th></th> |
790 | | - <?php if ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ) : ?> |
| 792 | + <?php if ( $is_dev_mode ) : ?> |
791 | 793 | <th></th> |
792 | 794 | <?php endif ?> |
793 | 795 | </tr> |
@@ -853,10 +855,20 @@ class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>" |
853 | 855 | 'is_whitelabeled' => ( $is_whitelabeled && ! $is_data_debug_mode ) |
854 | 856 | ); |
855 | 857 |
|
856 | | - fs_require_template( |
857 | | - 'account/partials/addon.php', |
858 | | - $addon_view_params |
859 | | - ); |
| 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 | + } |
860 | 872 |
|
861 | 873 | $odd = ! $odd; |
862 | 874 | } ?> |
|
0 commit comments