mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ Integrate phone-sync handler again
This commit is contained in:
parent
50711fb37d
commit
650bc2af41
2 changed files with 8 additions and 2 deletions
|
@ -5,6 +5,7 @@ import usePayPalScript from './usePayPalScript';
|
|||
import { setupWatermark } from '../components/Watermark';
|
||||
import { setupEmailFunctionality } from '../components/EmailButton';
|
||||
import { createEmailLookupHandler } from '../events/emailLookupManager';
|
||||
import { usePhoneSyncHandler } from './phoneSyncManager';
|
||||
import { initializeClassToggles } from '../helpers/classnamesManager';
|
||||
import { snapshotFields } from '../helpers/fieldHelpers';
|
||||
import useCustomerData from './useCustomerData';
|
||||
|
@ -15,7 +16,8 @@ const useAxoSetup = (
|
|||
fastlaneSdk,
|
||||
onChangeCardButtonClick,
|
||||
setShippingAddress,
|
||||
setCard
|
||||
setCard,
|
||||
setWooPhone
|
||||
) => {
|
||||
const { setIsAxoActive, setIsAxoScriptLoaded } = useDispatch( STORE_NAME );
|
||||
const paypalLoaded = usePayPalScript( ppcpConfig );
|
||||
|
@ -32,6 +34,8 @@ const useAxoSetup = (
|
|||
setBillingAddress: setWooBillingAddress,
|
||||
} = useCustomerData();
|
||||
|
||||
usePhoneSyncHandler( setWooPhone );
|
||||
|
||||
useEffect( () => {
|
||||
console.log( 'Initializing class toggles' );
|
||||
initializeClassToggles();
|
||||
|
|
|
@ -28,6 +28,7 @@ const Axo = ( props ) => {
|
|||
const { onPaymentSetup } = eventRegistration;
|
||||
const [ shippingAddress, setShippingAddress ] = useState( null );
|
||||
const [ card, setCard ] = useState( null );
|
||||
const [ wooPhone, setWooPhone ] = useState( '' );
|
||||
const [ paymentComponent, setPaymentComponent ] = useState( null );
|
||||
|
||||
const fastlaneSdk = useFastlaneSdk( axoConfig, ppcpConfig );
|
||||
|
@ -45,7 +46,8 @@ const Axo = ( props ) => {
|
|||
fastlaneSdk,
|
||||
onChangeCardButtonClick,
|
||||
setShippingAddress,
|
||||
setCard
|
||||
setCard,
|
||||
setWooPhone
|
||||
);
|
||||
usePaymentSetup( onPaymentSetup, emitResponse, card );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue