Merge pull request #2876 from woocommerce/PCP-3996-unsuccessfully-payment-with-fastlane-error-on-console-and-broken-env

Unsuccessfully payment with Fastlane, error on console and broken env (3996)
This commit is contained in:
Niklas Gutberlet 2024-12-06 15:24:44 +01:00 committed by GitHub
commit 6f85c53e1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,6 @@
import { registerPlugin } from '@wordpress/plugins';
import { useEffect, useCallback, useState, useRef } from '@wordpress/element';
import { useSelect } from '@wordpress/data';
import { PAYMENT_STORE_KEY } from '@woocommerce/block-data';
import PayPalInsights from '../../../../ppcp-axo/resources/js/Insights/PayPalInsights';
import { STORE_NAME } from '../stores/axoStore';
import usePayPalCommerceGateway from '../hooks/usePayPalCommerceGateway';
@ -149,6 +148,7 @@ const usePaymentMethodTracking = ( axoConfig, eventTracking ) => {
const isInitialMount = useRef( true );
const activePaymentMethod = useSelect( ( select ) => {
const { PAYMENT_STORE_KEY } = window.wc.wcBlocksData;
return select( PAYMENT_STORE_KEY )?.getActivePaymentMethod();
}, [] );