Feat: Correctly displaying Manual VOucher Edit Button

This commit is contained in:
2026-09-30 21:30:13 +03:00
parent 162827dff7
commit 3020bd070c
6 changed files with 18 additions and 12 deletions
+4 -4
View File
@@ -67,15 +67,15 @@ class Shipment extends Model
}
/**
* A link to the carrier's own tracking page — manual carriers only.
* Integrated carriers' history is synced, so customers follow it on
* our own order page instead.
* A link to the carrier's own tracking page — manual carriers and
* typed-in vouchers only. API-created shipments' history is synced, so
* customers follow it on our own order page instead.
*/
public function trackingUrl(): ?string
{
$template = $this->meta['tracking_url'] ?? null;
if ($this->source !== self::SOURCE_MANUAL || blank($template) || blank($this->tracking_reference)) {
if (! in_array($this->source, [self::SOURCE_MANUAL, self::SOURCE_MANUAL_VOUCHER], true) || blank($template) || blank($this->tracking_reference)) {
return null;
}