diff --git a/modules/ppcp-settings/resources/js/switchSettingsUi.js b/modules/ppcp-settings/resources/js/switchSettingsUi.js index 67930ac25..161f970f0 100644 --- a/modules/ppcp-settings/resources/js/switchSettingsUi.js +++ b/modules/ppcp-settings/resources/js/switchSettingsUi.js @@ -40,11 +40,13 @@ document.addEventListener( 'DOMContentLoaded', () => { document.addEventListener( 'click', ( event ) => { if ( event.target.closest( '.button.button-settings-switch-ui' ) || - event.target.closest( '.ppcp-notice-wrapper:not(.inline) a.settings-switch-ui' ) || + event.target.closest( + '.ppcp-notice-wrapper:not(.inline) a.settings-switch-ui' + ) || event.target.closest( 'a[name="settings-switch-ui"]' ) || event.target .closest( '.woocommerce-inbox-note__action-button' ) - .textContent.includes( 'Switch to New Settings' ) + ?.textContent.includes( 'Switch to New Settings' ) ) { handleClick( event ); }