|
|
@@ -13,11 +13,13 @@ class ProductMapper {
|
|
|
$currency = !empty($settings['currency']) ? $settings['currency'] : 'AUD';
|
|
|
|
|
|
$payload = [
|
|
|
- 'title' => $product['name'],
|
|
|
- 'description' => strip_tags($product['description']),
|
|
|
- 'sku' => $product['model'],
|
|
|
- 'inventory' => max(0, (int)$product['quantity']),
|
|
|
- 'price' => [
|
|
|
+ 'title' => $product['name'],
|
|
|
+ 'description' => strip_tags($product['description']),
|
|
|
+ 'sku' => $product['model'],
|
|
|
+ 'inventory' => max(0, (int)$product['quantity']),
|
|
|
+ 'has_inventory' => true,
|
|
|
+ 'publish' => true,
|
|
|
+ 'price' => [
|
|
|
'amount' => number_format((float)$product['price'], 2, '.', ''),
|
|
|
'currency' => $currency,
|
|
|
],
|