Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

Magento isRecurring


    /**
     * Whether there are recurring items
     *
     * @return bool
     */
    public function hasRecurringItems()
    {
        foreach ($this->getAllVisibleItems() as $item) {
            if ($item->getProduct() && $item->getProduct()->isRecurring()) {
                return true;
            }
        }
        return false;
    }
Advertisements

Comments are closed.

%d bloggers like this: