From 514b39eea0a122f6d8430098b4b9f264224d2837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 17 Sep 2024 16:56:55 +0200 Subject: [PATCH] Fix a type mismatch in UpdateProducts.php (#51408) * Fix a type mismatch in UpdateProducts.php * Add changelog file * Fix a type mismatch in UpdateProducts.php (II) --- .../changelog/fix-type-mismatch-updateproducts | 5 +++++ .../src/Blocks/AIContent/UpdateProducts.php | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 plugins/woocommerce/changelog/fix-type-mismatch-updateproducts diff --git a/plugins/woocommerce/changelog/fix-type-mismatch-updateproducts b/plugins/woocommerce/changelog/fix-type-mismatch-updateproducts new file mode 100644 index 00000000000..1af042a90a0 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-type-mismatch-updateproducts @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Fix a type mismatch in UpdateProducts.php + + diff --git a/plugins/woocommerce/src/Blocks/AIContent/UpdateProducts.php b/plugins/woocommerce/src/Blocks/AIContent/UpdateProducts.php index 571cb08029e..3ad62a779bb 100644 --- a/plugins/woocommerce/src/Blocks/AIContent/UpdateProducts.php +++ b/plugins/woocommerce/src/Blocks/AIContent/UpdateProducts.php @@ -4,6 +4,7 @@ namespace Automattic\WooCommerce\Blocks\AIContent; use Automattic\WooCommerce\Blocks\AI\Connection; use WP_Error; + /** * Pattern Images class. * @@ -473,11 +474,11 @@ class UpdateProducts { /** * Update the product with the new content. * - * @param \WC_Product $product The product. - * @param int $product_image_id The product image ID. - * @param string $product_title The product title. - * @param string $product_description The product description. - * @param int $product_price The product price. + * @param \WC_Product $product The product. + * @param int|string|WP_Error $product_image_id The product image ID. + * @param string $product_title The product title. + * @param string $product_description The product description. + * @param int $product_price The product price. * * @return int|\WP_Error */