mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ Initial version of Disconnect button
This commit is contained in:
parent
3c5c348d70
commit
91c8bdafb9
3 changed files with 94 additions and 4 deletions
|
@ -23,6 +23,7 @@ const useHooks = () => {
|
|||
authenticateWithOAuth,
|
||||
startWebhookSimulation,
|
||||
checkWebhookSimulationState,
|
||||
disconnectMerchant,
|
||||
} = useDispatch( STORE_NAME );
|
||||
|
||||
// Transient accessors.
|
||||
|
@ -78,6 +79,7 @@ const useHooks = () => {
|
|||
productionOnboardingUrl,
|
||||
authenticateWithCredentials,
|
||||
authenticateWithOAuth,
|
||||
disconnectMerchant,
|
||||
merchant,
|
||||
wooSettings,
|
||||
features,
|
||||
|
@ -115,6 +117,11 @@ export const useAuthentication = () => {
|
|||
};
|
||||
};
|
||||
|
||||
export const useDisconnectMerchant = () => {
|
||||
const { disconnectMerchant } = useHooks();
|
||||
return { disconnectMerchant };
|
||||
};
|
||||
|
||||
export const useWooSettings = () => {
|
||||
const { wooSettings } = useHooks();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue