PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Models/ProductDetail.php +3 -2 1.3.26 → 1.6.6 View file →
@@ -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',