disableHooks example


    public function calculate(): void
    {
        $behavior = $this->cart->getBehavior();
        if (!$behavior) {
            throw CartException::missingCartBehavior();
        }

        $this->cart = $behavior->disableHooks(fn () => $this->helper->calculate($this->cart, $behavior$this->context));
    }

    /** * The `price()` method returns the current price of the cart. * Note that this price may be outdated, if you changed something inside the cart in your script. * Use the `calculate()` method to recalculate the cart and update the price. * * @return CartPriceFacade The calculated price of the cart. */
    public function price(): CartPriceFacade
    {
        
Home | Imprint | This part of the site doesn't use cookies.