mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
♻️ Prevent upading clientId/secret via REST
This commit is contained in:
parent
6167955374
commit
bd7bbb36b2
2 changed files with 8 additions and 10 deletions
|
@ -57,14 +57,14 @@ class CommonSettings extends AbstractDataModel {
|
|||
return array(
|
||||
'use_sandbox' => false,
|
||||
'use_manual_connection' => false,
|
||||
'client_id' => '',
|
||||
'client_secret' => '',
|
||||
|
||||
// Details about connected merchant account.
|
||||
'merchant_connected' => false,
|
||||
'sandbox_merchant' => false,
|
||||
'merchant_id' => '',
|
||||
'merchant_email' => '',
|
||||
'client_id' => '',
|
||||
'client_secret' => '',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,14 +50,6 @@ class CommonRestEndpoint extends RestEndpoint {
|
|||
'js_name' => 'useManualConnection',
|
||||
'sanitize' => 'to_boolean',
|
||||
),
|
||||
'client_id' => array(
|
||||
'js_name' => 'clientId',
|
||||
'sanitize' => 'sanitize_text_field',
|
||||
),
|
||||
'client_secret' => array(
|
||||
'js_name' => 'clientSecret',
|
||||
'sanitize' => 'sanitize_text_field',
|
||||
),
|
||||
'webhooks' => array(
|
||||
'js_name' => 'webhooks',
|
||||
),
|
||||
|
@ -81,6 +73,12 @@ class CommonRestEndpoint extends RestEndpoint {
|
|||
'merchant_email' => array(
|
||||
'js_name' => 'email',
|
||||
),
|
||||
'client_id' => array(
|
||||
'js_name' => 'clientId',
|
||||
),
|
||||
'client_secret' => array(
|
||||
'js_name' => 'clientSecret',
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue