html-notice-untested-extensions-modal.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Admin View: Notice - Untested extensions.
  4. *
  5. * @package WooCommerce\Admin
  6. */
  7. if ( ! defined( 'ABSPATH' ) ) {
  8. exit;
  9. }
  10. $untested_plugins_msg = sprintf(
  11. /* translators: %s: version number */
  12. __( 'The following active plugin(s) have not declared compatibility with WooCommerce %s yet and should be updated and examined further before you proceed:', 'woocommerce' ),
  13. $new_version
  14. );
  15. ?>
  16. <div id="wc_untested_extensions_modal">
  17. <div class="wc_untested_extensions_modal--content">
  18. <h1><?php esc_html_e( "This is a major update, are you sure you're ready?", 'woocommerce' ); ?></h1>
  19. <div class="wc_plugin_upgrade_notice extensions_warning">
  20. <p><?php echo esc_html( $untested_plugins_msg ); ?></p>
  21. <div class="plugin-details-table-container">
  22. <table class="plugin-details-table" cellspacing="0">
  23. <thead>
  24. <tr>
  25. <th><?php esc_html_e( 'Plugin', 'woocommerce' ); ?></th>
  26. <th><?php esc_html_e( 'Tested up to WooCommerce version', 'woocommerce' ); ?></th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <?php foreach ( $plugins as $plugin ) : ?>
  31. <tr>
  32. <td><?php echo esc_html( $plugin['Name'] ); ?></td>
  33. <td><?php echo esc_html( $plugin['WC tested up to'] ); ?></td>
  34. </tr>
  35. <?php endforeach ?>
  36. </tbody>
  37. </table>
  38. </div>
  39. <p><?php esc_html_e( 'As this is a major update, we strongly recommend creating a backup of your site before updating.', 'woocommerce' ); ?> <a href="https://woocommerce.com/2017/05/create-use-backups-woocommerce/" target="_blank"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a></p>
  40. <?php if ( current_user_can( 'update_plugins' ) ) : ?>
  41. <div class="actions">
  42. <a href="#" class="button button-secondary cancel"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></a>
  43. <a class="button button-primary accept" href="#"><?php esc_html_e( 'Update now', 'woocommerce' ); ?></a>
  44. </div>
  45. <?php endif ?>
  46. </div>
  47. </div>
  48. </div>