From f470fb0c536c3859a583c2f3a28eb228088957d9 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Thu, 12 Sep 2024 14:37:22 +0200 Subject: [PATCH] Rename the useAxoBlockManager hook to useFastlaneSdk --- .../js/hooks/{useAxoBlockManager.js => useFastlaneSdk.js} | 4 ++-- modules/ppcp-axo-block/resources/js/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename modules/ppcp-axo-block/resources/js/hooks/{useAxoBlockManager.js => useFastlaneSdk.js} (93%) diff --git a/modules/ppcp-axo-block/resources/js/hooks/useAxoBlockManager.js b/modules/ppcp-axo-block/resources/js/hooks/useFastlaneSdk.js similarity index 93% rename from modules/ppcp-axo-block/resources/js/hooks/useAxoBlockManager.js rename to modules/ppcp-axo-block/resources/js/hooks/useFastlaneSdk.js index 815470898..dd62939d1 100644 --- a/modules/ppcp-axo-block/resources/js/hooks/useAxoBlockManager.js +++ b/modules/ppcp-axo-block/resources/js/hooks/useFastlaneSdk.js @@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from '@wordpress/element'; import Fastlane from '../../../../ppcp-axo/resources/js/Connection/Fastlane'; import { log } from '../../../../ppcp-axo/resources/js/Helper/Debug'; -const useAxoBlockManager = ( axoConfig, ppcpConfig ) => { +const useFastlaneSdk = ( axoConfig, ppcpConfig ) => { const [ fastlaneSdk, setFastlaneSdk ] = useState( null ); const initializingRef = useRef( false ); const configRef = useRef( { axoConfig, ppcpConfig } ); @@ -48,4 +48,4 @@ const useAxoBlockManager = ( axoConfig, ppcpConfig ) => { return fastlaneSdk; }; -export default useAxoBlockManager; +export default useFastlaneSdk; diff --git a/modules/ppcp-axo-block/resources/js/index.js b/modules/ppcp-axo-block/resources/js/index.js index b5964db87..bf7c5a6d4 100644 --- a/modules/ppcp-axo-block/resources/js/index.js +++ b/modules/ppcp-axo-block/resources/js/index.js @@ -6,7 +6,7 @@ import { registerPaymentMethod } from '@woocommerce/blocks-registry'; import { loadPaypalScript } from '../../../ppcp-button/resources/js/modules/Helper/ScriptLoading'; // Hooks -import useAxoBlockManager from './hooks/useAxoBlockManager'; +import useFastlaneSdk from './hooks/useFastlaneSdk'; import { useCustomerData } from './hooks/useCustomerData'; import { useShippingAddressChange } from './hooks/useShippingAddressChange'; import { useCardChange } from './hooks/useCardChange'; @@ -46,7 +46,7 @@ const Axo = ( props ) => { const [ paypalLoaded, setPaypalLoaded ] = useState( false ); const [ shippingAddress, setShippingAddress ] = useState( null ); const [ card, setCard ] = useState( null ); - const fastlaneSdk = useAxoBlockManager( axoConfig, ppcpConfig ); + const fastlaneSdk = useFastlaneSdk( axoConfig, ppcpConfig ); console.log( 'Axo component rendering' );