Ei kuvausta

html-notice-base-table-missing.php 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Admin View: Notice - Base table missing.
  4. *
  5. * @package WooCommerce\Admin
  6. */
  7. defined( 'ABSPATH' ) || exit;
  8. ?>
  9. <div class="updated woocommerce-message">
  10. <a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'base_tables_missing' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
  11. <?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
  12. </a>
  13. <p>
  14. <strong><?php esc_html_e( 'Database tables missing', 'woocommerce' ); ?></strong>
  15. </p>
  16. <p>
  17. <?php
  18. $verify_db_tool_available = array_key_exists( 'verify_db_tables', WC_Admin_Status::get_tools() );
  19. $missing_tables = get_option( 'woocommerce_schema_missing_tables' );
  20. if ( $verify_db_tool_available ) {
  21. echo wp_kses_post(
  22. sprintf(
  23. /* translators: %1%s: Missing tables (seperated by ",") %2$s: Link to check again */
  24. __( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s. <a href="%2$s">Check again.</a>', 'woocommerce' ),
  25. esc_html( implode( ', ', $missing_tables ) ),
  26. wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=verify_db_tables' ), 'debug_action' )
  27. )
  28. );
  29. } else {
  30. echo wp_kses_post(
  31. sprintf(
  32. /* translators: %1%s: Missing tables (seperated by ",") */
  33. __( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s.', 'woocommerce' ),
  34. esc_html( implode( ', ', $missing_tables ) )
  35. )
  36. );
  37. }
  38. ?>
  39. </p>
  40. </div>