From 58c26ff11feb94ac55f5a7c5ab304dca038f5bf5 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Thu, 7 Oct 2021 10:58:51 +0200 Subject: [PATCH] Use correct image value --- includes/admin/class-wc-admin-addons.php | 4 ++-- includes/admin/views/html-admin-page-addons.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-wc-admin-addons.php b/includes/admin/class-wc-admin-addons.php index fcbf51d2d01..dce49c40270 100644 --- a/includes/admin/class-wc-admin-addons.php +++ b/includes/admin/class-wc-admin-addons.php @@ -894,8 +894,8 @@ class WC_Admin_Addons { $formatted_promotions[] = array( 'title' => $locale->title, 'description' => $locale->description, - 'image' => $locale->image, - 'image_alt' => $locale->img_alt, + 'image' => ( 'http' === substr( $locale->image, 0, 4 ) ) ? $locale->image : WC()->plugin_url() . $locale->image, + 'image_alt' => $locale->image_alt, 'actions' => $promotion_actions, ); } diff --git a/includes/admin/views/html-admin-page-addons.php b/includes/admin/views/html-admin-page-addons.php index 405344e659d..e37f40cbf30 100644 --- a/includes/admin/views/html-admin-page-addons.php +++ b/includes/admin/views/html-admin-page-addons.php @@ -81,6 +81,7 @@ $current_section_name = __( 'Browse Categories', 'woocommerce' ); is_wc_admin_active() ) { }