diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-addons.php b/plugins/woocommerce/includes/admin/class-wc-admin-addons.php
index 6747fbabe92..27ca42b0d4e 100644
--- a/plugins/woocommerce/includes/admin/class-wc-admin-addons.php
+++ b/plugins/woocommerce/includes/admin/class-wc-admin-addons.php
@@ -1160,28 +1160,34 @@ class WC_Admin_Addons {
// For product-related banners icon is a product's image.
$mapped->icon = $data->image ?? null;
}
+
// URL.
$mapped->url = $data->link ?? null;
if ( empty( $mapped->url ) ) {
$mapped->url = $data->url ?? null;
}
+
// Title.
$mapped->title = $data->title ?? null;
+
// Vendor Name.
$mapped->vendor_name = $data->vendor_name ?? null;
if ( empty( $mapped->vendor_name ) ) {
$mapped->vendor_name = $data->vendorName ?? null; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
}
+
// Vendor URL.
$mapped->vendor_url = $data->vendor_url ?? null;
if ( empty( $mapped->vendor_url ) ) {
$mapped->vendor_url = $data->vendorUrl ?? null; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
}
+
// Description.
$mapped->description = $data->excerpt ?? null;
if ( empty( $mapped->description ) ) {
$mapped->description = $data->description ?? null;
}
+
$has_currency = ! empty( $data->currency ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
// Is Free.
@@ -1190,17 +1196,23 @@ class WC_Admin_Addons {
} else {
$mapped->is_free = '$0.00' === $data->price;
}
+
// Price.
if ( $has_currency ) {
$mapped->price = wc_price( $data->price, array( 'currency' => $data->currency ) );
} else {
$mapped->price = $data->price;
}
+
+ // Price suffix, e.g. "per month".
+ $mapped->price_suffix = $data->price_suffix ?? null;
+
// Rating.
$mapped->rating = $data->rating ?? null;
if ( null === $mapped->rating ) {
$mapped->rating = $data->averageRating ?? null; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
}
+
// Reviews Count.
$mapped->reviews_count = $data->reviews_count ?? null;
if ( null === $mapped->reviews_count ) {
@@ -1284,7 +1296,13 @@ class WC_Admin_Addons {
);
?>
-
+ price_suffix ) ) {
+ $price_suffix = $mapped->price_suffix;
+ }
+ echo esc_html( $price_suffix );;
+ ?>
reviews_count ) && ! empty( $mapped->rating ) ) : ?>