"If you find yourself in a hole, stop digging." That's wise advice, unless you're trying to dig a hole. Shopify (SHOP -1.23%) recently found itself in a hole with its shipping logistics business and made the grown-up decision to sell it instead of continuing to dig.

That change in the business model has completely upended the thesis of Shopify becoming a one-stop shop for all things e-commerce for small and medium-size businesses. So is the stock still worth an investment? Read on to find out.

A significant business change is happening

On June 6, Shopify said it completed the sale of its shipping divisions to Flexport. Shopify was already an investor in Flexport, and it believes that Flexport is a "mission-aligned partner." Flexport will become the official logistics partner for Shopify, so customers should see a seamless transition.

Included in the sale were Deliverr (a fulfillment software Shopify bought for $2.1 billion last July), 6 River Systems (a robotics warehouse firm), and the fulfillment network, which includes many warehouses.

Picture of a delivery person unloading packages.

Image source: Getty Images.

These weren't cheap investments, and in return for the sale, Shopify received a 13% stake in Flexport. Back in February 2022, Flexport was valued at $8 billion, and Shopify took a $935 million stake back then. With a new 13% interest now, that means Shopify got only $1.04 billion for its assets in the sale, per Flexport's last valuation.

While Flexport likely rose in value since then, it still represents a massive loss for Shopify, which will appear in its Q2 earnings report. Shopify will also lose a lot of revenue, as it will no longer be able to charge clients for shipping logistics. On the flip side, Shopify will shed a large chunk of its costs, as physical warehouses and the employees that staff them are a significant operating expense.

Despite this, Shopify's stock climbed 15% since the announcement on May 4, indicating investors are excited about the shift. However, with Shopify already trading for 14 times sales, when this revenue disappears, its valuation will spike.

Unfortunately, until we receive an earnings report with no logistics division revenue, investors are blind to how much money it generated and how much the deal cost Shopify.

So what do investors have to look forward to?

Shopify's financials will significantly change

If you're interested in investing in Shopify, it's best to focus on some of its non-logistics businesses. Shopify is seeing increased gross merchandise volume (GMV) on its platform, which rose 15% to $50 billion in Q1. Of that volume, more of it is being processed in-house on its Shop Pay product, as it processed 56% of gross merchandise volume in Q1 versus 51% of Q1 in 2022.

As Shopify brings more transactions in house with its payment processing software, it gets to keep a greater portion of the transaction pie.

This product was the most significant growth driver in its merchant solutions segment, which rose 31% in Q1. Notably, the revenue generated in this segment is where its shipping logistics revenue will also be, so investors need to pay attention to this area when Shopify reports Q2 and Q3 results.

The primary benefit of spinning off the logistics operation is that it will boost Shopify's margins. Shopify's gross margin was 48% in Q1, but I'd expect this metric to skyrocket to the high-50% range, as that's where it was early in Shopify's public company life, when logistics weren't a large part of the business.

SHOP Gross Profit Margin Chart

SHOP Gross Profit Margin data by YCharts

But until we get further clarity on how this spinoff will affect Shopify's financials, I think it's safe for investors to avoid adding shares, although there's no reason to sell if you hold Shopify stock already. If you must be invested in Shopify, it's OK to establish a small position, but with this much uncertainty surrounding the company, I think patience is the best action.