From 7a71ff36579e9fd79b13ea3f0b8652a37a655a8f Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Wed, 22 Jan 2025 15:48:11 +0100
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Remove=20description-locat?=
=?UTF-8?q?ion-logic?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Components/ReusableComponents/SettingsBlock.js | 12 ++++--------
.../SettingsBlocks/ControlTextInput.js | 10 ++++++++--
.../TabSettingsElements/Blocks/PaypalSettings.js | 4 ++--
.../Components/Settings/Blocks/InvoicePrefix.js | 7 ++-----
4 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlock.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlock.js
index b80d8f253..58fde60c2 100644
--- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlock.js
+++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlock.js
@@ -6,7 +6,6 @@ const SettingsBlock = ( {
children,
title,
titleSuffix,
- headerDescription,
description,
horizontalLayout = false,
separatorAndGap = true,
@@ -20,16 +19,13 @@ const SettingsBlock = ( {
- { title } { titleSuffix }
+ { title }
+ { titleSuffix }
- { headerDescription }
+ { description }
-
- { children }
-
- { description }
-
+ { children }
);
};
diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/ControlTextInput.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/ControlTextInput.js
index 08e6a8d11..ef597ded4 100644
--- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/ControlTextInput.js
+++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/ControlTextInput.js
@@ -1,8 +1,13 @@
import { TextControl } from '@wordpress/components';
-import { Action } from '../Elements';
+import { Action, Description } from '../Elements';
-const ControlTextInput = ( { value, onChange, placeholder = '' } ) => {
+const ControlTextInput = ( {
+ value,
+ description,
+ onChange,
+ placeholder = '',
+} ) => {
return (
{
value={ value }
onChange={ onChange }
/>
+ { description }
);
};
diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/PaypalSettings.js b/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/PaypalSettings.js
index 304b38815..a8561adac 100644
--- a/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/PaypalSettings.js
+++ b/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/PaypalSettings.js
@@ -84,7 +84,7 @@ const PaypalSettings = ( { updateFormValue, settings } ) => {
{
{
return (
{
) }
onChange={ setInvoicePrefix }
value={ invoicePrefix }
+ description="Add a unique prefix to invoice numbers for site-specific tracking (recommended)."
/>
);