From 23b79428f72219f72f78345c0be378b9c9f1f824 Mon Sep 17 00:00:00 2001 From: RJ <27843274+rjchow@users.noreply.github.com> Date: Fri, 17 Mar 2023 13:49:50 +0800 Subject: [PATCH] add: payment transaction processor images to payment recommendations (#37230) --- .../components/List/Item.js | 16 ++++++++++++++++ .../components/List/List.scss | 12 ++++++++++++ .../changelog/add-payment-recommendations-images | 4 ++++ .../src/Admin/API/PaymentGatewaySuggestions.php | 10 ++++++++++ 4 files changed, 42 insertions(+) create mode 100644 plugins/woocommerce/changelog/add-payment-recommendations-images diff --git a/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/List/Item.js b/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/List/Item.js index 80bdede39d2..25ceb1c4557 100644 --- a/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/List/Item.js +++ b/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/List/Item.js @@ -31,6 +31,7 @@ export const Item = ( { isRecommended, markConfigured, paymentGateway } ) => { settingsUrl: manageUrl, is_local_partner: isLocalPartner, external_link: externalLink, + transaction_processors: transactionProcessors, } = paymentGateway; const connectSlot = useSlot( @@ -88,6 +89,21 @@ export const Item = ( { isRecommended, markConfigured, paymentGateway } ) => {
{ content }
+ { transactionProcessors && ( +
+ { Object.keys( transactionProcessors ).map( + ( key ) => { + return ( + { + ); + } + ) } +
+ ) }
array( 'view', 'edit' ), 'readonly' => true, ), + 'transaction_processors' => array( + 'description' => __( 'Array of transaction processors and their images.', 'woocommerce' ), + 'type' => 'object', + 'addtionalProperties' => array( + 'type' => 'string', + 'format' => 'uri', + ), + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), ), );