Skip to content

Commit

Permalink
Fix issue when syncing variants without public urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Aug 23, 2019
1 parent d383934 commit 927725b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.10 - 2019-08-23
### Fixed
- Fix issue when syncing variants without public urls

## 1.1.9 - 2019-08-23
### Fixed
- Fix error when syncing products without public urls (Fixes #9)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ether/mailchimp-commerce",
"description": "Mailchimp integration with Craft Commerce",
"version": "1.1.9",
"version": "1.1.10",
"type": "craft-plugin",
"keywords": [
"mailchimp",
Expand Down
2 changes: 1 addition & 1 deletion src/services/ProductsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private function _buildProductData ($productId)
$data['variants'][] = [
'id' => (string) $variant->id,
'title' => $variant->title,
'url' => Craft::getAlias($variant->url ?: $product->url),
'url' => Craft::getAlias(($variant->url ?: $product->url) ?? ''),
'sku' => $variant->sku,
'price' => (float) $variant->price,
'inventory_quantity' => (int) ($unlimited ? PHP_INT_MAX : $stock),
Expand Down

0 comments on commit 927725b

Please sign in to comment.