mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
✨ Add new hook for production ISU login
This commit is contained in:
parent
a8f12c63fa
commit
05c1978f0d
3 changed files with 38 additions and 1 deletions
|
@ -82,6 +82,17 @@ export const useSandboxConnection = () => {
|
|||
};
|
||||
};
|
||||
|
||||
export const useProductionConnection = () => {
|
||||
const { connectToProduction } = CommonHooks.useProduction();
|
||||
const products = OnboardingHooks.useDetermineProducts();
|
||||
const handleProductionConnect = useConnectionAttempt(
|
||||
() => connectToProduction( products ),
|
||||
MESSAGES.PRODUCTION_ERROR
|
||||
);
|
||||
|
||||
return { handleProductionConnect };
|
||||
};
|
||||
|
||||
export const useManualConnection = () => {
|
||||
const { handleError, handleSuccess, createErrorNotice } =
|
||||
useConnectionBase();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue