mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-08 19:48:52 +08:00
Settings UI: Update Overview tab Features button links
This commit is contained in:
parent
b902d2eea2
commit
b2bb4efb60
2 changed files with 19 additions and 36 deletions
|
@ -32,13 +32,17 @@ const FeatureSettingsBlock = ( { title, description, ...props } ) => {
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|
||||||
return button.urls ? (
|
// If there's a URL (either direct or in urls object), wrap in anchor tag
|
||||||
<a href={ button.urls.live } key={ button.text }>
|
if ( button.url || button.urls ) {
|
||||||
|
const href = button.urls ? button.urls.live : button.url;
|
||||||
|
return (
|
||||||
|
<a href={ href } key={ button.text }>
|
||||||
{ buttonElement }
|
{ buttonElement }
|
||||||
</a>
|
</a>
|
||||||
) : (
|
|
||||||
buttonElement
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return buttonElement;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -39,10 +39,7 @@ const Features = {
|
||||||
{
|
{
|
||||||
type: 'tertiary',
|
type: 'tertiary',
|
||||||
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/studio/checkout/standard',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -88,10 +85,7 @@ const Features = {
|
||||||
{
|
{
|
||||||
type: 'tertiary',
|
type: 'tertiary',
|
||||||
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/studio/checkout/advanced',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -122,20 +116,14 @@ const Features = {
|
||||||
{
|
{
|
||||||
type: 'secondary',
|
type: 'secondary',
|
||||||
text: __( 'Apply', 'woocommerce-paypal-payments' ),
|
text: __( 'Apply', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/docs/checkout/apm/',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
showWhen: 'disabled',
|
showWhen: 'disabled',
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'tertiary',
|
type: 'tertiary',
|
||||||
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/docs/checkout/apm/',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -176,10 +164,7 @@ const Features = {
|
||||||
{
|
{
|
||||||
type: 'tertiary',
|
type: 'tertiary',
|
||||||
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/docs/checkout/apm/google-pay/',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -240,10 +225,7 @@ const Features = {
|
||||||
{
|
{
|
||||||
type: 'tertiary',
|
type: 'tertiary',
|
||||||
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/docs/checkout/apm/apple-pay/',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -283,10 +265,7 @@ const Features = {
|
||||||
{
|
{
|
||||||
type: 'tertiary',
|
type: 'tertiary',
|
||||||
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
text: __( 'Learn more', 'woocommerce-paypal-payments' ),
|
||||||
urls: {
|
url: 'https://developer.paypal.com/studio/checkout/pay-later/us',
|
||||||
sandbox: '#',
|
|
||||||
live: '#',
|
|
||||||
},
|
|
||||||
class: 'small-button',
|
class: 'small-button',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue