Browse Source

fix currency service error

3.x
wallo 1 year ago
parent
commit
64b54d938f
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      app/Listeners/UpdateCurrencyRates.php

+ 4
- 1
app/Listeners/UpdateCurrencyRates.php View File

4
 
4
 
5
 use App\Contracts\CurrencyHandler;
5
 use App\Contracts\CurrencyHandler;
6
 use App\Events\DefaultCurrencyChanged;
6
 use App\Events\DefaultCurrencyChanged;
7
+use App\Facades\Forex;
7
 use App\Models\Setting\Currency;
8
 use App\Models\Setting\Currency;
8
 use Illuminate\Support\Facades\DB;
9
 use Illuminate\Support\Facades\DB;
9
 
10
 
29
                 $defaultCurrency->update(['rate' => 1]);
30
                 $defaultCurrency->update(['rate' => 1]);
30
             }
31
             }
31
 
32
 
32
-            $this->updateOtherCurrencyRates($defaultCurrency);
33
+            if (Forex::isEnabled()) {
34
+                $this->updateOtherCurrencyRates($defaultCurrency);
35
+            }
33
         });
36
         });
34
     }
37
     }
35
 
38
 

Loading…
Cancel
Save