Totally Zenned
- Join Date:
- Aug 2007
- Location:
- Gijón, Asturias, Spain
- Posts:
- 2,876
- Plugin Contributions:
- 7
Correct method to add new define constant?
If I want to use a new constant, for example in the moneyorder payment method,
I could
a) Add this constant to the** original** defines file
b) Create an override file and add the constant there only
c) Create an override file and add the constant there and in the original file
d) Add it to a file in the extra_defines folder.
These all seems to work correctly and previously I have always done b) but I suspect that is not correct as I have recently seen php error notices that indicate it cannot actually "see" that constant but assumes it (usually correctly).
Would I be correct in saying the overrides file should only be used for overriding the original constants defined in the original language file and so d) is the correct option?
thanks
Steve
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...