Skip to content

Commit

Permalink
202307 update subscribe conditional2 (#259)
Browse files Browse the repository at this point in the history
* updates subscribe conditional

* updates changelogger config and adds to unreleased

* updates version for composer dev file
  • Loading branch information
cykolln authored Jul 20, 2023
1 parent 91b6c3b commit c50f731
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelogger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ versioned_files:
- rel_path: composer.json
pattern: '"version": "{{ old_version }}",'
jinja: '"version": "{{ new_version }}",'
- rel_path: composer.dev.json
pattern: '"version": "{{ old_version }}",'
jinja: '"version": "{{ new_version }}",'
- rel_path: etc/module.xml
pattern: 'name="Klaviyo_Reclaim" setup_version="{{ old_version }}" schema_version="{{ old_version }}"'
jinja: 'name="Klaviyo_Reclaim" setup_version="{{ new_version }}" schema_version="{{ new_version }}"'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### Fixed
- Fixed issue when viewed product block on product page caused slower response time
- Fixed issue for newletter module where new subscriptions weren't being sent to klaviyo via magento forms for stores using Magento version < 2.4.3

### [4.0.11] - 2023-04-07

Expand Down
2 changes: 1 addition & 1 deletion Observer/NewsletterSubscribeObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function execute(Observer $observer)

/** @var Subscriber $subscriber */
$subscriber = $observer->getDataObject();
if ($subscriber && $subscriber->isStatusChanged()) {
if ($subscriber && ($subscriber->isStatusChanged() || $subscriber->isObjectNew())) {
$subscriptionStatus = $subscriber->getStatus();
$customer = $this->getCustomer($subscriber);

Expand Down
2 changes: 1 addition & 1 deletion composer.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "klaviyo/magento2-extension-dev",
"description": "The local development composer file. This is used for local and continuous integration setup/testing.",
"type": "magento2-module",
"version": "4.0.9",
"version": "4.0.11",
"autoload": {
"psr-4": {
"Klaviyo\\Reclaim\\": ""
Expand Down

0 comments on commit c50f731

Please sign in to comment.