🐛 Fix inconsistent property names

This commit is contained in:
Philipp Stracker 2025-01-16 20:04:47 +01:00
parent e5f882cc57
commit 510a711caa
No known key found for this signature in database
2 changed files with 8 additions and 9 deletions

View file

@ -47,8 +47,8 @@ export const STYLING_LOCATIONS = {
), ),
link: '#', link: '#',
}, },
'product-page': { product: {
value: 'product-page', value: 'product',
label: __( 'Product Page', 'woocommerce-paypal-payments' ), label: __( 'Product Page', 'woocommerce-paypal-payments' ),
// translators: %s is the URL to a documentation page. // translators: %s is the URL to a documentation page.
description: __( description: __(
@ -113,14 +113,14 @@ export const STYLING_LAYOUTS = {
}; };
export const STYLING_SHAPES = { export const STYLING_SHAPES = {
pill: {
value: 'pill',
label: __( 'Pill', 'woocommerce-paypal-payments' ),
},
rect: { rect: {
value: 'rect', value: 'rect',
label: __( 'Rectangle', 'woocommerce-paypal-payments' ), label: __( 'Rectangle', 'woocommerce-paypal-payments' ),
}, },
pill: {
value: 'pill',
label: __( 'Pill', 'woocommerce-paypal-payments' ),
},
}; };
export const STYLING_PAYMENT_METHODS = { export const STYLING_PAYMENT_METHODS = {

View file

@ -92,9 +92,8 @@ export const useStylingProps = ( location ) => {
// Payment methods (checkboxes). // Payment methods (checkboxes).
paymentMethodChoices: Object.values( STYLING_PAYMENT_METHODS ), paymentMethodChoices: Object.values( STYLING_PAYMENT_METHODS ),
paymentMethods: getLocationProp( 'paymentMethods' ), paymentMethods: getLocationProp( 'methods' ),
setPaymentMethods: ( methods ) => setPaymentMethods: ( methods ) => setLocationProp( 'methods', methods ),
setLocationProp( 'paymentMethods', methods ),
// Color (dropdown). // Color (dropdown).
colorChoices: Object.values( STYLING_COLORS ), colorChoices: Object.values( STYLING_COLORS ),