From f8ee8a23381f0a8556ab5ddc9ba1e98c7540b95a Mon Sep 17 00:00:00 2001 From: Finn Paes Date: Mon, 8 Jan 2024 13:05:27 +0100 Subject: [PATCH] Reset failure data if success --- src/Actions/UpdatePrices.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Actions/UpdatePrices.php b/src/Actions/UpdatePrices.php index 58f3411..80c10be 100644 --- a/src/Actions/UpdatePrices.php +++ b/src/Actions/UpdatePrices.php @@ -37,6 +37,11 @@ public function update(string $sku): void $this->magentoCustomerPrices->update($model); + $model->update([ + 'fail_count' => 0, + 'last_failed' => null, + ]); + activity() ->performedOn($model) ->log('Updated price');