Function __global->get_tax_service_hook
Definitions
sources/ecommerce_tax.php
- Load a tax service hook into cache and return it.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $tax_service | ?ID_TEXT | No | No | Null | N/A | N/A | The name of the tax service hook to load (null: load the tax service configured with the site) |
| $fail_ok | boolean | No | No | False | N/A | N/A | Whether a failure should not trigger an error |
Returns
- The hook object (null: hook not found and $fail_ok was true)
- Type: ?object
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Load a tax service hook into cache and return it.
*
* @param ?ID_TEXT $tax_service The name of the tax service hook to load (null: load the tax service configured with the site)
* @param boolean $fail_ok Whether a failure should not trigger an error
* @return ?object The hook object (null: hook not found and $fail_ok was true)
*/
function get_tax_service_hook(?string $tax_service = null, bool $fail_ok = false) : ?object
* Load a tax service hook into cache and return it.
*
* @param ?ID_TEXT $tax_service The name of the tax service hook to load (null: load the tax service configured with the site)
* @param boolean $fail_ok Whether a failure should not trigger an error
* @return ?object The hook object (null: hook not found and $fail_ok was true)
*/
function get_tax_service_hook(?string $tax_service = null, bool $fail_ok = false) : ?object
