Skip to content

Instantly share code, notes, and snippets.

@YuzuruSano
Created April 7, 2021 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YuzuruSano/fbf8fc4db569de5f819fe7735da8d1f9 to your computer and use it in GitHub Desktop.
Save YuzuruSano/fbf8fc4db569de5f819fe7735da8d1f9 to your computer and use it in GitHub Desktop.
mw wp form で管理者宛メールを送信しない
<?php
//略
add_filter('mwform_admin_mail_mw-wp-form-xxx', [$this, 'adminMailBlock'], 9, 3);
//略
public function adminMailBlock($Mail, $values, $Data){
$Mail->to = '';
add_filter( 'mwform_is_mail_sended', function(){
return true;
} );
return $Mail;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment