Commit 244da402738 for woocommerce

commit 244da402738945baed159af2cc2cc9f4dcb08fcd
Author: Vladimir Reznichenko <kalessil@gmail.com>
Date:   Thu May 21 12:23:06 2026 +0200

    [dev] Monorepo: fixed remaining failing tests. (#65233)

diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php
index 14dc0147fb8..edb3b05320b 100644
--- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php
+++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php
@@ -338,7 +338,7 @@ class Products extends Task {
 	 */
 	public function maybe_redirect_to_add_product_tasklist() {
 		$screen = get_current_screen();
-		if ( 'edit' === $screen->base && 'product' === $screen->post_type ) {
+		if ( $screen && 'edit' === $screen->base && 'product' === $screen->post_type ) {
 			// wp_count_posts is cached.
 			$counts = (array) wp_count_posts( $screen->post_type );
 			unset( $counts['auto-draft'] );
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
index 30adfe0d70d..0e46361157b 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
@@ -1135,6 +1135,11 @@ class OrdersTableQuery {
 			$this->where[] = $this->where( $this->tables['orders'], $arg_key, '=', $this->args[ $arg_key ], $this->mappings['orders'][ $arg_key ]['type'] );
 		}

+		// customer_note allows empty string to match orders with no note, so it cannot use arg_isset (which skips '').
+		if ( isset( $this->args['customer_note'] ) ) {
+			$this->where[] = $this->where( $this->tables['orders'], 'customer_note', '=', $this->args['customer_note'], $this->mappings['orders']['customer_note']['type'] );
+		}
+
 		if ( $this->arg_isset( 'parent_exclude' ) ) {
 			$this->where[] = $this->where( $this->tables['orders'], 'parent_order_id', '!=', $this->args['parent_exclude'], 'int' );
 		}
@@ -1267,7 +1272,6 @@ class OrdersTableQuery {
 				'discount_tax_amount',
 				'shipping_total_amount',
 				'shipping_tax_amount',
-				'customer_note',
 			),
 			array( $this, 'arg_isset' )
 		);
diff --git a/plugins/woocommerce/tests/php/src/Internal/Email/EmailLoggerTest.php b/plugins/woocommerce/tests/php/src/Internal/Email/EmailLoggerTest.php
index 10b897ca0df..599c48e5e2f 100644
--- a/plugins/woocommerce/tests/php/src/Internal/Email/EmailLoggerTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/Email/EmailLoggerTest.php
@@ -198,7 +198,7 @@ class EmailLoggerTest extends WC_Unit_Test_Case {

 		$log = $this->captured_logs[0];
 		$this->assertStringNotContainsString( 'customer@example.com', $log['message'], 'Raw recipient address must not appear in the logged message.' );
-		$this->assertStringNotContainsString( 'server.example.org', $log['message'], 'Domain-only host names should be left intact (only address-shaped tokens are redacted).' );
+		$this->assertStringContainsString( 'server.example.org', $log['message'], 'Domain-only host names should be left intact (only address-shaped tokens are redacted).' );
 		$this->assertStringContainsString( '[redacted_email]', $log['message'], 'Redacted addresses should be replaced with the [redacted_email] marker.' );
 	}