2025-01-13 19:03:33 +01:00
import { _ _ } from '@wordpress/i18n' ;
2025-01-13 17:06:05 +01:00
/ * *
* Name of the Redux store module .
*
* Used by : Reducer , Selector , Index
*
* @ type { string }
* /
export const STORE _NAME = 'wc/paypal/style' ;
/ * *
* REST path to hydrate data of this module by loading data from the WP DB .
*
* Used by : Resolvers
* See : StylingRestEndpoint . php
*
* @ type { string }
* /
export const REST _HYDRATE _PATH = '/wc/v3/wc_paypal/styling' ;
/ * *
* REST path to persist data of this module to the WP DB .
*
* Used by : Controls
* See : StylingRestEndpoint . php
*
* @ type { string }
* /
export const REST _PERSIST _PATH = '/wc/v3/wc_paypal/styling' ;
2025-01-13 19:03:33 +01:00
export const STYLING _LOCATIONS = {
cart : {
value : 'cart' ,
label : _ _ ( 'Cart' , 'woocommerce-paypal-payments' ) ,
2025-01-14 16:19:18 +01:00
// translators: %s is the URL to a documentation page.
2025-01-13 19:03:33 +01:00
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">Cart page</a> and select which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
link : '#' ,
} ,
'classic-checkout' : {
value : 'classic-checkout' ,
label : _ _ ( 'Classic Checkout' , 'woocommerce-paypal-payments' ) ,
2025-01-14 16:19:18 +01:00
// translators: %s is the URL to a documentation page.
2025-01-13 19:03:33 +01:00
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">Classic Checkout page</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
link : '#' ,
} ,
'express-checkout' : {
value : 'express-checkout' ,
label : _ _ ( 'Express Checkout' , 'woocommerce-paypal-payments' ) ,
2025-01-14 16:19:18 +01:00
// translators: %s is the URL to a documentation page.
2025-01-13 19:03:33 +01:00
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">Express Checkout location</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
link : '#' ,
} ,
'mini-cart' : {
value : 'mini-cart' ,
label : _ _ ( 'Mini Cart' , 'woocommerce-paypel-payements' ) ,
2025-01-14 16:19:18 +01:00
// translators: %s is the URL to a documentation page.
2025-01-13 19:03:33 +01:00
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">Mini Cart</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
link : '#' ,
} ,
'product-page' : {
value : 'product-page' ,
label : _ _ ( 'Product Page' , 'woocommerce-paypal-payments' ) ,
2025-01-14 16:19:18 +01:00
// translators: %s is the URL to a documentation page.
2025-01-13 19:03:33 +01:00
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">Product Page</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
link : '#' ,
} ,
} ;
export const STYLING _LABELS = {
paypal : {
value : 'paypal' ,
label : _ _ ( 'PayPal' , 'woocommerce-paypal-payments' ) ,
} ,
checkout : {
value : 'checkout' ,
label : _ _ ( 'Checkout' , 'woocommerce-paypal-payments' ) ,
} ,
buynow : {
value : 'buynow' ,
label : _ _ ( 'PayPal Buy Now' , 'woocommerce-paypal-payments' ) ,
} ,
pay : {
value : 'pay' ,
label : _ _ ( 'Pay with PayPal' , 'woocommerce-paypal-payments' ) ,
} ,
} ;
export const STYLING _COLORS = {
gold : {
value : 'gold' ,
label : _ _ ( 'Gold (Recommended)' , 'woocommerce-paypal-payments' ) ,
} ,
blue : {
value : 'blue' ,
label : _ _ ( 'Blue' , 'woocommerce-paypal-payments' ) ,
} ,
silver : {
value : 'silver' ,
label : _ _ ( 'Silver' , 'woocommerce-paypal-payments' ) ,
} ,
black : {
value : 'black' ,
label : _ _ ( 'Black' , 'woocommerce-paypal-payments' ) ,
} ,
white : {
value : 'white' ,
label : _ _ ( 'White' , 'woocommerce-paypal-payments' ) ,
} ,
} ;
export const STYLING _LAYOUTS = {
vertical : {
value : 'vertical' ,
label : _ _ ( 'Vertical' , 'woocommerce-paypal-payments' ) ,
} ,
horizontal : {
value : 'horizontal' ,
label : _ _ ( 'Horizontal' , 'woocommerce-paypal-payments' ) ,
} ,
} ;
export const STYLING _SHAPES = {
pill : {
value : 'pill' ,
label : _ _ ( 'Pill' , 'woocommerce-paypal-payments' ) ,
} ,
rect : {
value : 'rect' ,
label : _ _ ( 'Rectangle' , 'woocommerce-paypal-payments' ) ,
} ,
} ;