loadMissing('store'); $store = $order->store; if (! $store || ! $store->plugin_token_hash) { return; } $site = rtrim((string) $store->site_url, '/'); $url = $site.'/wp-json/ladill-woo/v1/orders/'.$order->external_order_id.'/fulfillment'; try { Http::acceptJson() ->asJson() ->timeout(12) ->withHeaders([ 'X-Ladill-Store' => $store->public_id, ]) ->post($url, [ 'fulfillment_status' => $order->fulfillment_status, 'order_number' => $order->order_number, ]); } catch (\Throwable $e) { Log::warning('Woo fulfillment sync failed', [ 'order_id' => $order->id, 'store_id' => $store->id, 'error' => $e->getMessage(), ]); } } }