Created
December 5, 2024 04:33
-
-
Save KevinGraham-com/ebda978f7dd3a0b570cc6d310283969c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_hook('EmailPreSend', 1, 'disableSomeMails'); | |
| function disableSomeMails($vars) { | |
| // update the 11 below to whichever hour you run this task at. | |
| if (date('g') == 11 AND $vars['messagename'] == "Credit Card Payment Failed") { | |
| return array('abortsend' => 'true'); | |
| } else { | |
| return 'success'; } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment