# sync-basalam/1.10.3/templates/notifications/CircuitBreakerAlert.php

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

- Page: https://pluginprobe.com/plugins/sync-basalam/1.10.3/code/templates/notifications/CircuitBreakerAlert.php
- Raw: https://pluginprobe.com/plugins/sync-basalam/1.10.3/raw/templates/notifications/CircuitBreakerAlert.php
- Modified: 2026-07-22T10:38:20+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.3/code/templates/notifications/CircuitBreakerAlert.php#L10-L20`.

```php
<?php

defined('ABSPATH') || exit;

use SyncBasalam\Services\Api\CircuitBreaker;

$state = $circuitBreaker->getState();
$failureCount = $circuitBreaker->getFailureCount();
$lastFailure = $circuitBreaker->getLastFailure();

if ($state === CircuitBreaker::STATE_CLOSED) return;

$noticeClass = $state === CircuitBreaker::STATE_OPEN ? 'notice notice-error' : 'notice notice-warning';
$stateLabel = $state === CircuitBreaker::STATE_OPEN ? 'OPEN' : 'HALF_OPEN';
$description = $state === CircuitBreaker::STATE_OPEN
    ? 'ارتباط با باسلام به دلیل خطای سمت باسلام، به طور موقت قطع و بعد از دقایقی در صورت در دسترس بودن سرویس های باسلام، ارتباط مجددا ایجاد میشود.'
    : 'ووسلام در حال تست بازگشت ارتباط با باسلام است و فقط یک درخواست آزمایشی را اجرا میکند.';
?>
<div class="<?php echo esc_attr($noticeClass); ?> basalam-notice-flex">
    <p class="basalam-p basalam-text-right basalam-padding-0">
        <?php echo esc_html($description); ?>
    </p>
</div>

```
