mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
✨ Add new “reset” flag to the JS-logic
This commit is contained in:
parent
921546953e
commit
da80defa93
2 changed files with 7 additions and 3 deletions
|
@ -153,13 +153,17 @@ export function authenticateWithOAuth( sharedId, authCode, useSandbox ) {
|
|||
/**
|
||||
* Side effect. Checks webhook simulation.
|
||||
*
|
||||
* @param {boolean} fullReset When true, all plugin settings are reset to initial values.
|
||||
* @return {Function} The thunk function.
|
||||
*/
|
||||
export function disconnectMerchant() {
|
||||
export function disconnectMerchant( fullReset = false ) {
|
||||
return async () => {
|
||||
return await apiFetch( {
|
||||
path: REST_DISCONNECT_MERCHANT_PATH,
|
||||
method: 'POST',
|
||||
data: {
|
||||
reset: fullReset,
|
||||
},
|
||||
} );
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue