Settings UI: Fix merchant features state retrieval in hooks

This commit is contained in:
Daniel Dudzic 2025-01-21 13:04:30 +01:00
parent ab3cca33ec
commit b902d2eea2
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
3 changed files with 8 additions and 1 deletions

View file

@ -21,7 +21,7 @@ import {
const TabOverview = () => {
const [ isRefreshing, setIsRefreshing ] = useState( false );
const { merchant, merchantFeatures } = useMerchantInfo();
const { merchant, features: merchantFeatures } = useMerchantInfo();
const { refreshFeatureStatuses, setActiveModal } =
useDispatch( STORE_NAME );
const { createSuccessNotice, createErrorNotice } =

View file

@ -133,6 +133,7 @@ export const useWebhooks = () => {
checkWebhookSimulationState,
};
};
export const useMerchantInfo = () => {
const { isReady, merchant, features } = useHooks();
const { refreshMerchantData } = useDispatch( STORE_NAME );

View file

@ -45,6 +45,12 @@ const defaultTransient = Object.freeze( {
google_pay: {
enabled: false,
},
alternative_payment_methods: {
enabled: false,
},
pay_later_messaging: {
enabled: false,
},
} ),
webhooks: Object.freeze( [] ),