Feat: Correctly displaying Manual VOucher Edit Button
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user