diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/HooksTableBlock.js b/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/HooksTableBlock.js index 990d2ab8c..c86309ddd 100644 --- a/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/HooksTableBlock.js +++ b/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/HooksTableBlock.js @@ -1,6 +1,9 @@ import { __ } from '@wordpress/i18n'; +import { CommonHooks } from '../../../../../../data'; + +const HooksTableBlock = () => { + const { webhooks } = CommonHooks.useWebhooks(); -const HooksTableBlock = ( { webhooks } ) => { return ( diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/Troubleshooting.js b/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/Troubleshooting.js index e1f2eacc8..546659b1f 100644 --- a/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/Troubleshooting.js +++ b/modules/ppcp-settings/resources/js/Components/Screens/Overview/TabSettingsElements/Blocks/Troubleshooting/Troubleshooting.js @@ -7,15 +7,12 @@ import { ToggleSettingsBlock, } from '../../../../../ReusableComponents/SettingsBlocks'; import SettingsBlock from '../../../../../ReusableComponents/SettingsBlocks/SettingsBlock'; -import { CommonHooks } from '../../../../../../data'; import SimulationBlock from './SimulationBlock'; import ResubscribeBlock from './ResubscribeBlock'; import HooksTableBlock from './HooksTableBlock'; const Troubleshooting = ( { updateFormValue, settings } ) => { - const { webhooks } = CommonHooks.useWebhooks(); - return ( { . - + diff --git a/modules/ppcp-settings/resources/js/data/common/reducer.js b/modules/ppcp-settings/resources/js/data/common/reducer.js index 350d9c308..8b5cfb9b3 100644 --- a/modules/ppcp-settings/resources/js/data/common/reducer.js +++ b/modules/ppcp-settings/resources/js/data/common/reducer.js @@ -35,7 +35,7 @@ const defaultPersistent = Object.freeze( { useManualConnection: false, clientId: '', clientSecret: '', - webhooks: 0, + webhooks: [], } ); // Reducer logic.