Skip to content

Commit

Permalink
Update Taxes::EVENT_REGISTER_TAX_ENGINE phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Nov 15, 2024
1 parent f610d85 commit 3d3e995
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/services/Taxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ class Taxes extends Component implements TaxEngineInterface
/**
* @event TaxEngineEvent The event that is triggered when determining the tax engine.
* @since 3.1
*
* ```php
* use craft\commerce\base\TaxEngineInterface;
* use craft\commerce\engines\Tax;
* use craft\commerce\events\TaxEngineEvent;
* use craft\commerce\services\Taxes;
* use yii\base\Event;
*
* Event::on(
* Taxes::class,
* Taxes::EVENT_REGISTER_TAX_ENGINE,
* function(TaxEngineEvent $event) {
* // @var TaxEngineInterface $currentEngine
* $currentEngine = $event->engine;
*
* // Set a new tax engine on `$event->engine`
* // ...
* }
* );
* ```
*/
public const EVENT_REGISTER_TAX_ENGINE = 'registerTaxEngine';

Expand Down

0 comments on commit 3d3e995

Please sign in to comment.