From b866ac79f65837349c844d86c1550fa2746c8e5d Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Fri, 17 Jan 2025 16:34:06 +0100
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Improve=20location=20namin?=
=?UTF-8?q?g=20in=20React?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/js/data/styling/configuration.js | 12 ++++++------
.../resources/js/data/styling/reducer.js | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/modules/ppcp-settings/resources/js/data/styling/configuration.js b/modules/ppcp-settings/resources/js/data/styling/configuration.js
index beed2d832..130d5451b 100644
--- a/modules/ppcp-settings/resources/js/data/styling/configuration.js
+++ b/modules/ppcp-settings/resources/js/data/styling/configuration.js
@@ -13,20 +13,20 @@ export const STYLING_LOCATIONS = {
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-cart',
props: { layout: false, tagline: false },
},
- 'classic-checkout': {
- value: 'classic-checkout',
+ classicCheckout: {
+ value: 'classicCheckout',
label: __( 'Classic Checkout', 'woocommerce-paypal-payments' ),
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-checkout',
props: { layout: true, tagline: true },
},
- 'express-checkout': {
- value: 'express-checkout',
+ expressCheckout: {
+ value: 'expressCheckout',
label: __( 'Express Checkout', 'woocommerce-paypal-payments' ),
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-block-express-checkout',
props: { layout: false, tagline: false },
},
- 'mini-cart': {
- value: 'mini-cart',
+ miniCart: {
+ value: 'miniCart',
label: __( 'Mini Cart', 'woocommerce-paypel-payements' ),
link: 'https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-mini-cart',
props: { layout: true, tagline: true },
diff --git a/modules/ppcp-settings/resources/js/data/styling/reducer.js b/modules/ppcp-settings/resources/js/data/styling/reducer.js
index e41cd1e40..5ce6062a9 100644
--- a/modules/ppcp-settings/resources/js/data/styling/reducer.js
+++ b/modules/ppcp-settings/resources/js/data/styling/reducer.js
@@ -34,7 +34,7 @@ const defaultPersistent = Object.freeze( {
shape: STYLING_SHAPES.rect.value,
color: STYLING_COLORS.gold.value,
} ),
- [ STYLING_LOCATIONS[ 'classic-checkout' ].value ]: Object.freeze( {
+ [ STYLING_LOCATIONS.classicCheckout.value ]: Object.freeze( {
enabled: true,
methods: [],
label: STYLING_LABELS.checkout.value,
@@ -43,14 +43,14 @@ const defaultPersistent = Object.freeze( {
layout: STYLING_LAYOUTS.vertical.value,
tagline: false,
} ),
- [ STYLING_LOCATIONS[ 'express-checkout' ].value ]: Object.freeze( {
+ [ STYLING_LOCATIONS.expressCheckout.value ]: Object.freeze( {
enabled: true,
methods: [],
label: STYLING_LABELS.checkout.value,
shape: STYLING_SHAPES.rect.value,
color: STYLING_COLORS.gold.value,
} ),
- [ STYLING_LOCATIONS[ 'mini-cart' ].value ]: Object.freeze( {
+ [ STYLING_LOCATIONS.miniCart.value ]: Object.freeze( {
enabled: true,
methods: [],
label: STYLING_LABELS.pay.value,