In-app Marketplace: gracefully handle products with no vendorUrl (#40271)

This commit is contained in:
And Finally 2023-09-19 16:06:52 +01:00 committed by GitHub
commit e4d6933e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View File

@ -22,12 +22,14 @@ export default function ProductListContent( props: {
title: product.title,
icon: product.icon,
vendorName: product.vendorName,
vendorUrl: appendURLParams( product.vendorUrl, [
vendorUrl: product.vendorUrl
? appendURLParams( product.vendorUrl, [
[ 'utm_source', 'extensionsscreen' ],
[ 'utm_medium', 'product' ],
[ 'utm_campaign', 'wcaddons' ],
[ 'utm_content', 'devpartner' ],
] ),
] )
: '',
price: product.price,
url: appendURLParams(
product.url,

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: More-resilient handling of absent product vendor URLs when browsing WooCommerce > Extensions.