Remove the Firefox onboarding notice

This commit is contained in:
Narek Zakarian 2025-08-06 15:42:43 +04:00
parent 8e1307cae6
commit 0d1fdb11e4
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -8,13 +8,6 @@ import { OnboardingHooks } from '../../../../data/onboarding/hooks';
import BusyStateWrapper from '../../../ReusableComponents/BusyStateWrapper';
import { Notice } from '../../../ReusableComponents/Elements';
const useIsFirefox = () => {
if ( typeof window === 'undefined' ) {
return false;
}
return window.navigator.userAgent.toLowerCase().indexOf( 'firefox' ) > -1;
};
/**
* Button component that outputs a placeholder button when no onboardingUrl is present yet - the
* placeholder button looks identical to the working button, but has no href, target, or
@ -36,8 +29,6 @@ const ButtonOrPlaceholder = ( {
children,
onClick,
} ) => {
const isFirefox = useIsFirefox();
const buttonProps = {
className,
variant,
@ -51,20 +42,6 @@ const ButtonOrPlaceholder = ( {
buttonProps[ 'data-paypal-onboard-button' ] = 'true';
}
if ( isFirefox ) {
return (
<>
<Button { ...buttonProps }>{ children }</Button>
<Notice type={ 'error' }>
{ __(
'This button may not work in Firefox. Please use another browser, like Chrome, to complete this step.',
'woocommerce-paypal-payments'
) }
</Notice>
</>
);
}
return <Button { ...buttonProps }>{ children }</Button>;
};