Skip to content

Commit

Permalink
chore(release): merge in release v3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
matticbot committed Sep 4, 2024
2 parents b2ab2f3 + ff5500a commit d5d0ee6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.0.1](https://github.com/Automattic/newspack-popups/compare/v3.0.0...v3.0.1) (2024-09-04)


### Bug Fixes

* **segmentation:** handle bad MC API key ([aecc659](https://github.com/Automattic/newspack-popups/commit/aecc6591d57b1a6b560c264ba7145e95434ae7ff))

# [3.0.0](https://github.com/Automattic/newspack-popups/compare/v2.34.1...v3.0.0) (2024-08-13)


Expand Down
15 changes: 10 additions & 5 deletions includes/class-newspack-popups-segmentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,23 @@ public static function reindex_segments( $segments ) {
* @param array $data Data associated with the event.
*/
public static function reader_logged_in( $timestamp, $data ) {
$user_id = $data['user_id'];
$email = $data['email'];

// See newspack-newsletters/includes/class-newspack-newsletters.php:827.
$api_key = \get_option( 'newspack_mailchimp_api_key', false );

if ( ! $api_key ) {
return;
}

$mailchimp = new Mailchimp( $api_key );
$contacts = $mailchimp->get(
try {
$mailchimp = new Mailchimp( $api_key );
} catch ( \Exception $th ) {
return;
}

$user_id = $data['user_id'];
$email = $data['email'];

$contacts = $mailchimp->get(
'search-members',
[
'fields' => [ 'members.email_address', 'members.merge_fields' ],
Expand Down
2 changes: 1 addition & 1 deletion newspack-popups.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: https://newspack.com
* Text Domain: newspack-popups
* Domain Path: /languages
* Version: 3.0.0
* Version: 3.0.1
*
* @package Newspack_Popups
*/
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "newspack-popups",
"version": "3.0.0",
"version": "3.0.1",
"author": "Automattic",
"scripts": {
"cm": "newspack-scripts commit",
Expand Down

0 comments on commit d5d0ee6

Please sign in to comment.