From d94be87d876efa211eb1e2b45bece7fe4576c89f Mon Sep 17 00:00:00 2001 From: Josh Angell Date: Thu, 20 May 2021 11:34:15 +0100 Subject: [PATCH] Changing variant `hasUnlimitedStock` value to be 0 or 1 as strings. --- src/controllers/ProductsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProductsController.php b/src/controllers/ProductsController.php index e5623f3..1101f9f 100644 --- a/src/controllers/ProductsController.php +++ b/src/controllers/ProductsController.php @@ -434,7 +434,7 @@ private function _rawProductEntryToVariantArray(Entry $rawProduct, $default = fa 'optionValueOrName' => $formattedOptionValues ?: $rawProduct->vendProductVariantName, 'parentProductId' => $rawProduct->vendProductVariantParentId, 'default' => $default, - 'hasUnlimitedStock' => !$productJson['has_inventory'], + 'hasUnlimitedStock' => ($productJson['has_inventory'] ? '0' : '1'), 'inventory' => $rawProduct->vendInventoryCount, 'formattedOptionNames' => $formattedOptionNames, 'formattedOptionValues' => $formattedOptionValues, @@ -503,4 +503,4 @@ private function _updateInventoryInline(Entry $entry) } } -} \ No newline at end of file +}