From bd4075209d11a46d9cea724ba222d40dc60cd009 Mon Sep 17 00:00:00 2001 From: Karthik Thayyil Date: Thu, 5 Sep 2024 09:00:18 +0100 Subject: [PATCH 1/2] remove redundent setting --- .../free-listings/setup-free-listings/index.js | 10 ---------- js/src/data/actions.js | 5 ----- 2 files changed, 15 deletions(-) diff --git a/js/src/components/free-listings/setup-free-listings/index.js b/js/src/components/free-listings/setup-free-listings/index.js index 3f26ae7b9c..7381e95e28 100644 --- a/js/src/components/free-listings/setup-free-listings/index.js +++ b/js/src/components/free-listings/setup-free-listings/index.js @@ -35,11 +35,6 @@ const settingsFieldNames = [ 'shipping_rate', 'shipping_time', 'tax_rate', - 'website_live', - 'checkout_process_secure', - 'payment_methods_visible', - 'refund_tos_visible', - 'contact_info_visible', ]; /** @@ -214,11 +209,6 @@ const SetupFreeListings = ( { shipping_rate: settings.shipping_rate, shipping_time: settings.shipping_time, tax_rate: settings.tax_rate, - website_live: settings.website_live, - checkout_process_secure: settings.checkout_process_secure, - payment_methods_visible: settings.payment_methods_visible, - refund_tos_visible: settings.refund_tos_visible, - contact_info_visible: settings.contact_info_visible, // This is used in UI only, not used in API. offer_free_shipping: getOfferFreeShippingInitialValue( shippingRates ), diff --git a/js/src/data/actions.js b/js/src/data/actions.js index 2b67eb9b33..23f0748d92 100644 --- a/js/src/data/actions.js +++ b/js/src/data/actions.js @@ -85,11 +85,6 @@ import { isWCIos, isWCAndroid } from '.~/utils/isMobileApp'; * @property {'automatic'|'flat'|'manual'} [shipping_rate] Type of the shipping rate. * @property {'flat'|'manual'} [shipping_time] Type of the shipping time. * @property {string|null} [tax_rate] Type of tax rate, There are two possible values if US is selected: 'destination' and 'manual' otherwise will be null. - * @property {boolean} [website_live] Whether the store website is live. - * @property {boolean} [checkout_process_secure] Whether the checkout process is complete and secure. - * @property {boolean} [payment_methods_visible] Whether the payment methods are visible on the website. - * @property {boolean} [refund_tos_visible] Whether the refund policy and terms of service are visible on the website. - * @property {boolean} [contact_info_visible] Whether the phone number, email, and/or address are visible on the website. */ /** From 504167a4dc01e805440cf427ccab147307bfede5 Mon Sep 17 00:00:00 2001 From: Karthik Thayyil Date: Thu, 5 Sep 2024 09:16:36 +0100 Subject: [PATCH 2/2] cs fixes --- .../components/free-listings/setup-free-listings/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/src/components/free-listings/setup-free-listings/index.js b/js/src/components/free-listings/setup-free-listings/index.js index 7381e95e28..4d7f0c74f0 100644 --- a/js/src/components/free-listings/setup-free-listings/index.js +++ b/js/src/components/free-listings/setup-free-listings/index.js @@ -31,11 +31,7 @@ const targetAudienceFields = [ 'locale', 'language', 'location', 'countries' ]; * * If we are adding a new settings field, it should be added into this array. */ -const settingsFieldNames = [ - 'shipping_rate', - 'shipping_time', - 'tax_rate', -]; +const settingsFieldNames = [ 'shipping_rate', 'shipping_time', 'tax_rate' ]; /** * Get settings object from Form values.