add_filter( 'gettext', function ( $translated, $text, $domain ) { if ( $domain === 'paid-memberships-pro' && $text === 'Nonce security check failed.' ) { return 'Your security session could not be verified. Please refresh the page and try again. If the problem persists, please contact us.'; } return $translated; }, 20, 3 );