options = Options::init(); parent::__construct( $parent_page ); // Remove unnecessary $_GET parameters and prevent url duplications in _wp_http_referer input. $this->remove_get_parameters(); } /** * Link label of a tab. * * @since 3.0.0 * * @return string */ public function get_label() { return esc_html__( 'Debug Events', 'wp-mail-smtp' ); } /** * Title of a tab. * * @since 3.0.0 * * @return string */ public function get_title() { return $this->get_label(); } /** * Register hooks. * * @since 3.0.0 */ public function hooks() { add_action( 'wp_mail_smtp_admin_area_enqueue_assets', [ $this, 'enqueue_assets' ] ); } /** * Enqueue required JS and CSS. * * @since 3.0.0 */ public function enqueue_assets() { $min = WP::asset_min(); wp_enqueue_style( 'wp-mail-smtp-flatpickr', wp_mail_smtp()->assets_url . '/css/vendor/flatpickr.min.css', [], '4.6.9' ); wp_enqueue_script( 'wp-mail-smtp-flatpickr', wp_mail_smtp()->assets_url . '/js/vendor/flatpickr.min.js', [ 'jquery' ], '4.6.9', true ); wp_enqueue_script( 'wp-mail-smtp-tools-debug-events', wp_mail_smtp()->assets_url . "/js/smtp-tools-debug-events{$min}.js", [ 'jquery', 'wp-mail-smtp-flatpickr' ], WPMS_PLUGIN_VER, true ); wp_localize_script( 'wp-mail-smtp-tools-debug-events', 'wp_mail_smtp_tools_debug_events', [ 'lang_code' => sanitize_key( WP::get_language_code() ), 'plugin_url' => wp_mail_smtp()->plugin_url, 'loader' => wp_mail_smtp()->prepare_loader( 'blue' ), 'texts' => [ 'delete_all_notice' => esc_html__( 'Are you sure you want to permanently delete all debug events?', 'wp-mail-smtp' ), 'cancel' => esc_html__( 'Cancel', 'wp-mail-smtp' ), 'close' => esc_html__( 'Close', 'wp-mail-smtp' ), 'yes' => esc_html__( 'Yes', 'wp-mail-smtp' ), 'ok' => esc_html__( 'OK', 'wp-mail-smtp' ), 'notice_title' => esc_html__( 'Heads up!', 'wp-mail-smtp' ), 'error_occurred' => esc_html__( 'An error occurred!', 'wp-mail-smtp' ), ], ] ); } /** * Get email logs list table. * * @since 3.0.0 * * @return Table */ public function get_table() { if ( $this->table === null ) { $this->table = new Table(); } return $this->table; } /** * Display scheduled actions table. * * @since 3.0.0 */ public function display() { ?>
create the missing DB tables by clicking on this link. If this issue persists, please contact our support and provide the error message below:', 'wp-mail-smtp' ),
esc_url( $create_missing_tables_url ),
esc_url( $contact_support_url )
),
[
'a' => [
'href' => [],
'target' => [],
'rel' => [],
],
]
);
echo '
';
echo '' . esc_html( $error_message ) . '';
} else {
echo wp_kses(
sprintf( /* translators: %1$s - create missing tables link; %2$s - contact support link. */
__( 'WP Mail SMTP is using custom database tables for some of its features. In order to work properly, the custom tables should be created, and it seems they are missing. Please try to create the missing DB tables by clicking on this link. If this issue persists, please contact our support.', 'wp-mail-smtp' ),
esc_url( $create_missing_tables_url ),
esc_url( $contact_support_url )
),
[
'a' => [
'href' => [],
'target' => [],
'rel' => [],
],
]
);
}
?>