Can I override core behavior of CRM/SMS/Providers.php by creating the file with the changes in my civicrm_custom_php directory?
It seems as @spidersilk is trying to achieve the same: civicrm.stackexchange.com/q/826/49– FlyingMay 3, 2015 at 16:17
The answer is "yes" but...
Overriding an entire file means upgrades will become difficult, as you'll have to manually diff the contents of that file with the one in the new version, and reapply your changes.
If possible, try accomplishing your goal using a hook.
1I'm only changing one line in the file and it's just changing the activity status from Completed to Needs Response. Otherwise the file is identical. I don't understand hooks, tried figuring them out but never could wrap my head around them.– frTommyMay 2, 2015 at 20:12
Documentation for implementing a hook is here. I suggest you try hook_civicrm_postProcess for simple alterations to a submitted form.– ColemanMay 2, 2015 at 20:28
Is there also a link to the documentation for overriding PHP files using the custom directory? We use this approach but I couldn't find any links to documentation explaining it in more detail (what can be overridden etc.)– JohnAug 11, 2015 at 15:28
The answer is yes, you can do that. I tested it and it worked.