Skip to content

Commit

Permalink
Merge branch 'release' into hotfix/transaction-fee-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoo authored Jan 30, 2025
2 parents f3c6d40 + 3b27716 commit dabf955
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [5.12.4](https://github.com/Automattic/newspack-plugin/compare/v5.12.3...v5.12.4) (2025-01-28)


### Bug Fixes

* create guest contributors dummy emails ([#3705](https://github.com/Automattic/newspack-plugin/issues/3705)) ([528712c](https://github.com/Automattic/newspack-plugin/commit/528712c2638c105f15557facb3611585efda2398))

## [5.12.3](https://github.com/Automattic/newspack-plugin/compare/v5.12.2...v5.12.3) (2025-01-23)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public static function get_dummy_email_address( $user_or_name ) {
if ( is_string( $user_or_name ) ) {
return $user_or_name . '@' . $email_domain;
}
return $user->user_login . '@' . $email_domain;
return $user_or_name->user_login . '@' . $email_domain;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions newspack.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Newspack
* Description: An advanced open-source publishing and revenue-generating platform for news organizations.
* Version: 5.12.3
* Version: 5.12.4
* Author: Automattic
* Author URI: https://newspack.com/
* License: GPL2
Expand All @@ -14,7 +14,7 @@

defined( 'ABSPATH' ) || exit;

define( 'NEWSPACK_PLUGIN_VERSION', '5.12.3' );
define( 'NEWSPACK_PLUGIN_VERSION', '5.12.4' );

// Define NEWSPACK_PLUGIN_FILE.
if ( ! defined( 'NEWSPACK_PLUGIN_FILE' ) ) {
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",
"version": "5.12.3",
"version": "5.12.4",
"description": "The Newspack plugin. https://newspack.com",
"bugs": {
"url": "https://github.com/Automattic/newspack-plugin/issues"
Expand Down
16 changes: 16 additions & 0 deletions tests/unit-tests/guest-contributor-role.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ public function set_up() { // phpcs:ignore Squiz.Commenting.FunctionComment.Miss
wp_reset_postdata();
}

/**
* On a post with author.
*/
public function test_guest_contributor_role_get_dummy_email() {
$email_domain = Guest_Contributor_Role::get_dummy_email_domain();
$user = get_userdata( 1 );

$expected = $user->user_login . '@' . $email_domain;

$dummy_email = Guest_Contributor_Role::get_dummy_email_address( $user );
$this->assertSame( $expected, $dummy_email );

$dummy_email = Guest_Contributor_Role::get_dummy_email_address( $user->user_login );
$this->assertSame( $expected, $dummy_email );
}

/**
* On a post with author.
*/
Expand Down

0 comments on commit dabf955

Please sign in to comment.