mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
seperate title and description of the two gateways
This commit is contained in:
parent
b88c82eaf5
commit
473cc3108d
2 changed files with 42 additions and 5 deletions
|
@ -258,6 +258,22 @@ return [
|
|||
'requirements' => [],
|
||||
'gateway' => 'paypal',
|
||||
],
|
||||
'dcc_gateway_title' => [
|
||||
'title' => __('Title', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'text',
|
||||
'description' => __(
|
||||
'This controls the title which the user sees during checkout.',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'default' => __('PayPal', 'woocommerce-paypal-commerce-gateway'),
|
||||
'desc_tip' => true,
|
||||
'screens' => [
|
||||
State::STATE_PROGRESSIVE,
|
||||
State::STATE_ONBOARDED,
|
||||
],
|
||||
'requirements' => [],
|
||||
'gateway' => 'dcc',
|
||||
],
|
||||
'description' => [
|
||||
'title' => __('Description', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'text',
|
||||
|
@ -277,6 +293,25 @@ return [
|
|||
'requirements' => [],
|
||||
'gateway' => 'paypal',
|
||||
],
|
||||
'dcc_gateway_description' => [
|
||||
'title' => __('Description', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'text',
|
||||
'desc_tip' => true,
|
||||
'description' => __(
|
||||
'This controls the description which the user sees during checkout.',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'default' => __(
|
||||
'Pay via PayPal; you can pay with your credit card if you don\'t have a PayPal account.',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'screens' => [
|
||||
State::STATE_PROGRESSIVE,
|
||||
State::STATE_ONBOARDED,
|
||||
],
|
||||
'requirements' => [],
|
||||
'gateway' => 'dcc',
|
||||
],
|
||||
'intent' => [
|
||||
'title' => __('Intent', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'select',
|
||||
|
|
|
@ -45,15 +45,15 @@ class CreditCardGateway extends PayPalGateway
|
|||
];
|
||||
}
|
||||
|
||||
$this->method_title = __('Credit Card Payments', 'woocommerce-paypal-commerce-gateway');
|
||||
$this->method_title = __('PayPal Credit Card', 'woocommerce-paypal-commerce-gateway');
|
||||
$this->method_description = __(
|
||||
'Provide your customers with the option to pay with credit card.',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
);
|
||||
$this->title = $this->config->has('title') ?
|
||||
$this->config->get('title') : $this->method_title;
|
||||
$this->description = $this->config->has('description') ?
|
||||
$this->config->get('description') : $this->method_description;
|
||||
$this->title = $this->config->has('dcc_gateway_title') ?
|
||||
$this->config->get('dcc_gateway_title') : $this->method_title;
|
||||
$this->description = $this->config->has('dcc_gateway_description') ?
|
||||
$this->config->get('dcc_gateway_description') : $this->method_description;
|
||||
|
||||
$this->init_form_fields();
|
||||
$this->init_settings();
|
||||
|
@ -66,6 +66,8 @@ class CreditCardGateway extends PayPalGateway
|
|||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function generate_ppcp_html(): string
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue