mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
PCP-21 / add option for button label
This commit is contained in:
parent
93d70249c7
commit
713d5bdda1
2 changed files with 22 additions and 1 deletions
|
@ -229,7 +229,7 @@ class SmartButton implements SmartButtonInterface
|
||||||
'layout' => 'vertical',
|
'layout' => 'vertical',
|
||||||
'color' => ($this->settings->has('button_color')) ? $this->settings->get('button_color') : null,
|
'color' => ($this->settings->has('button_color')) ? $this->settings->get('button_color') : null,
|
||||||
'shape' => ($this->settings->has('button_shape')) ? $this->settings->get('button_shape') : null,
|
'shape' => ($this->settings->has('button_shape')) ? $this->settings->get('button_shape') : null,
|
||||||
'label' => 'paypal',
|
'label' => ($this->settings->has('button_label')) ? $this->settings->get('button_label') : 'paypal',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'hosted_fields' => [
|
'hosted_fields' => [
|
||||||
|
|
|
@ -249,6 +249,27 @@ return [
|
||||||
State::STATE_ONBOARDED,
|
State::STATE_ONBOARDED,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'button_label' => [
|
||||||
|
'title' => __('Button Label', 'woocommerce-paypal-commerce-gateway'),
|
||||||
|
'type' => 'select',
|
||||||
|
'class' => ['wc-enhanced-select'],
|
||||||
|
'default' => 'paypal',
|
||||||
|
'desc_tip' => true,
|
||||||
|
'description' => __(
|
||||||
|
'This controls the label on the primary button.',
|
||||||
|
'woocommerce-paypal-commerce-gateway'
|
||||||
|
),
|
||||||
|
'options' => [
|
||||||
|
'paypal' => __('PayPal', 'woocommerce-paypal-commerce-gateway'),
|
||||||
|
'checkout' => __('PayPal Checkout', 'woocommerce-paypal-commerce-gateway'),
|
||||||
|
'buynow' => __('PayPal Buy Now', 'woocommerce-paypal-commerce-gateway'),
|
||||||
|
'pay' => __('Pay with PayPal', 'woocommerce-paypal-commerce-gateway'),
|
||||||
|
],
|
||||||
|
'screens' => [
|
||||||
|
State::STATE_PROGRESSIVE,
|
||||||
|
State::STATE_ONBOARDED,
|
||||||
|
],
|
||||||
|
],
|
||||||
'button_color' => [
|
'button_color' => [
|
||||||
'title' => __('Color', 'woocommerce-paypal-commerce-gateway'),
|
'title' => __('Color', 'woocommerce-paypal-commerce-gateway'),
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue