# sync-basalam/1.10.22/includes/Jobs/Exceptions/StaleVariationException.php

ووسلام – همگام سازی ووکامرس و باسلام, version 1.10.22. 40 lines.

- Page: https://pluginprobe.com/plugins/sync-basalam/1.10.22/code/includes/Jobs/Exceptions/StaleVariationException.php
- Raw: https://pluginprobe.com/plugins/sync-basalam/1.10.22/raw/includes/Jobs/Exceptions/StaleVariationException.php
- Modified: 2026-09-27T14:34:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sync-basalam/1.10.22/code/includes/Jobs/Exceptions/StaleVariationException.php#L10-L20`.

```php
<?php

namespace SyncBasalam\Jobs\Exceptions;

defined('ABSPATH') || exit;

/**
 * A locally stored Basalam variation id no longer exists for the product.
 *
 * Keeping this distinct from a general 404 lets the product update service
 * rebuild only the variation mapping without disconnecting the product.
 */
class StaleVariationException extends NonRetryableException
{
    private $basalamProductId;
    private $basalamVariationId;

    public function __construct($basalamProductId, $basalamVariationId, \Throwable $previous)
    {
        $this->basalamProductId = $basalamProductId;
        $this->basalamVariationId = $basalamVariationId;

        parent::__construct(
            'شناسه متغیر ذخیره‌شده در باسلام دیگر معتبر نیست.',
            404,
            $previous
        );
    }

    public function getBasalamProductId()
    {
        return $this->basalamProductId;
    }

    public function getBasalamVariationId()
    {
        return $this->basalamVariationId;
    }
}

```
