| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | use FluentCart\App\Models\Concerns\CanSearch; |
| 7 | 7 | use FluentCart\App\Models\Concerns\CanUpdateBatch; |
| 8 | 8 | use FluentCart\Framework\Database\Orm\Relations\BelongsTo; |
| 9 | 9 | use FluentCart\Framework\Database\Orm\Relations\HasMany; |
| 10 | -use FluentCart\Framework\Database\Orm\Relations\hasOne; | |
| 10 | +use FluentCart\Framework\Database\Orm\Relations\HasOne; | |
| 11 | 11 | use FluentCart\App\Models\WpModels\PostMeta; |
| 12 | 12 | use FluentCart\Framework\Support\Arr; |
| 13 | 13 | |
| 14 | 14 | /** |
| @@ -156,8 +156,9 @@ | ||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | public function getStockAvailability($variationId = null) |
| 159 | 159 | { |
| 160 | + | |
| 160 | 161 | if (!$this->manage_stock) { |
| 161 | 162 | $availability = [ |
| 162 | 163 | 'manage_stock' => false, |
| 163 | 164 | 'availability' => __('In Stock', 'fluent-cart'), |
| @@ -163,9 +164,9 @@ | ||
| 163 | 164 | 'availability' => __('In Stock', 'fluent-cart'), |
| 164 | 165 | 'class' => 'in-stock', |
| 165 | 166 | 'available_quantity' => null |
| 166 | 167 | ]; |
| 167 | - } else if ($this->stock_availability) { | |
| 168 | + } else if ($this->stock_availability === 'in-stock') { | |
| 168 | 169 | $availability = [ |
| 169 | 170 | 'manage_stock' => true, |
| 170 | 171 | 'availability' => __('In Stock', 'fluent-cart'), |
| 171 | 172 | 'class' => 'in-stock', |