Skip to content

Commit

Permalink
Merge branch 'release/3.0.0' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Oct 31, 2023
2 parents 061809c + d29b3f7 commit f4b6e37
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: rsync deployments
uses: burnett01/rsync-deployments@4.1
with:
switches: -avzr --delete
switches: -avzr
path: ./dist/
remote_path: ${{ secrets.NYS_DOCS_ROOT }}${{ env.DOCS_DEST_DIR }}
remote_host: ${{ secrets.NYS_DEPLOY_REMOTE_HOST }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Instant Analytics GA4 Changelog

## 3.0.0 - 2023.10.31
### Added
* Add currency to all Commerce GA4 events, but better. ([#20](https://github.com/nystudio107/craft-instantanalytics-ga4/issues/20))

## 3.0.0-beta.4 - 2023.10.23
### Added
* Add currency to all Commerce GA4 events. ([#20](https://github.com/nystudio107/craft-instantanalytics-ga4/issues/20))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-instantanalytics-ga4",
"description": "Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce",
"type": "craft-plugin",
"version": "3.0.0-beta.4",
"version": "3.0.0",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 2 additions & 1 deletion src/services/Commerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ protected function addProductDataFromLineItem(ItemBaseEvent $event, LineItem $li
$eventItem->setItemId($purchasable->getSku() ?? $lineItem->getSku());
$eventItem->setPrice($lineItem->salePrice);
$eventItem->setQuantity($lineItem->qty);
$eventItem->setCurrency(CommercePlugin::getInstance()->getPaymentCurrencies()->getPrimaryPaymentCurrencyIso());

// Handle this purchasable being a Variant
if (is_a($purchasable, Variant::class)) {
Expand Down Expand Up @@ -443,6 +442,8 @@ protected function getNewItemParameter(): ItemParameter
{
$parameter = new ItemParameter();
$parameter->setAffiliation(InstantAnalytics::$plugin->ga4->getAnalytics()->getAffiliation());
$parameter->setCurrency(CommercePlugin::getInstance()->getPaymentCurrencies()->getPrimaryPaymentCurrencyIso());

return $parameter;
}
}

0 comments on commit f4b6e37

Please sign in to comment.