Created
October 31, 2014 13:31
-
-
Save tristanlins/5764ee829c1254c9bbcb 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 | |
| class Shipping | |
| { | |
| public function isAvailable() | |
| { | |
| // HOOK: allow to add custom logic | |
| if (isset($GLOBALS['ISO_HOOKS']['shippingIsAvailable']) && is_array($GLOBALS['ISO_HOOKS']['shippingIsAvailable'])) | |
| { | |
| foreach ($GLOBALS['ISO_HOOKS']['shippingIsAvailable'] as $callback) | |
| { | |
| $objCallback = \System::importStatic($callback[0]); | |
| $available = $objCallback->$callback[1]($this); | |
| if (true === $available || false === $available) { | |
| return $available; | |
| } | |
| } | |
| } | |
| ... | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment