(Reuters) -WeWork Inc said on Friday it had struck deals to cut debt by about $1.5 billion and extend the date of some maturities, in a bid to preserve cash as the flexible-workspace provider feels the heat of mass layoffs on its business.

The company, which offers workstations, private offices and customized floors, had enjoyed a pandemic-driven shift to flexible work outside traditional offices, but is now gearing up for a potential fallout from a likely economic downturn.

WeWork said it will also infuse the company with about $540 million in new funding.

Last month, the company forecast weak current-quarter revenue, after having announced moves to cut 300 jobs and exit 40 underperforming U.S. locations in a move aimed at curbing its real-estate footprint.

Under the deals announced Friday, key investor SoftBank Group Corp’s $1.0 billion unsecured notes would be converted to equity. The Japanese company held a stake of about 46% in WeWork before the restructuring was announced, as per Refinitiv data.

About $1.9 billion of pro-forma debt will now mature in 2027, WeWork said, adding that it would have less than $2.0 billion in net debt once the deal closes.

The agreements also cover an ad-hoc group which represent over 60% of the company’s public bonds and a third-party investor, WeWork said. The group includes King Street Capital Management L.P. and BlackRock Inc.

WeWork, which went public in 2021 after a two-year struggle, is yet to post a quarterly profit. But the company said on Friday it expects to turn a core profit this year, helped by cost cuts.

PJT Partners LP advised WeWork on the debt restructuring, while Houlihan Lokey advised SoftBank.

(Reporting by Priyamvada C and Kannaki Deka; Editing by Shailesh Kuber)