Home / Admin / Hide the Email Test Menu Item in Settings
Duplicate Snippet

Embed Snippet on Your Site

Hide the Email Test Menu Item in Settings

This snippet will hide the 'Email Test' tab from your WP Mail SMTP settings menu.

Code Preview
php
<?php
/* Hide the Email Test Menu Item in Settings  
 * 
 * Original doc: https://wpmailsmtp.com/docs/hiding-the-email-test-menu-item-in-settings/
*/
add_filter( 'wp_mail_smtp_admin_get_pages', function ( $pages ) {
 
    unset( $pages[ 'test' ] );
 
    return $pages;
}, PHP_INT_MAX );

Comments

Add a Comment