diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabOverview.js b/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabOverview.js index d22b15461..03b44b04c 100644 --- a/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabOverview.js +++ b/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabOverview.js @@ -26,7 +26,10 @@ import { import SpinnerOverlay from '../../../ReusableComponents/SpinnerOverlay'; import { useFeatures } from '../../../../data/features/hooks'; import { selectTab, TAB_IDS } from '../../../../utils/tabSelector'; -import { setActiveModal } from '../../../../data/common/actions'; +import { + setActiveHighlight, + setActiveModal, +} from '../../../../data/common/actions'; const TabOverview = () => { const { isReady: areTodosReady } = TodosHooks.useStore(); @@ -231,6 +234,9 @@ const OverviewFeatureItem = ( { if ( feature.action?.modal ) { setActiveModal( feature.action.modal ); } + if ( feature.action?.highlight ) { + setActiveHighlight( feature.action.highlight ); + } }; const actionProps = { diff --git a/modules/ppcp-settings/src/Data/Definition/FeaturesDefinition.php b/modules/ppcp-settings/src/Data/Definition/FeaturesDefinition.php index 47d053b90..63685928c 100644 --- a/modules/ppcp-settings/src/Data/Definition/FeaturesDefinition.php +++ b/modules/ppcp-settings/src/Data/Definition/FeaturesDefinition.php @@ -78,9 +78,8 @@ class FeaturesDefinition { 'type' => 'secondary', 'text' => __( 'Configure', 'woocommerce-paypal-payments' ), 'action' => array( - 'type' => 'tab', - 'tab' => 'settings', - 'section' => 'ppcp--save-payment-methods', + 'type' => 'tab', + 'tab' => 'settings', ), 'showWhen' => 'enabled', 'class' => 'small-button', @@ -112,10 +111,11 @@ class FeaturesDefinition { 'type' => 'secondary', 'text' => __( 'Configure', 'woocommerce-paypal-payments' ), 'action' => array( - 'type' => 'tab', - 'tab' => 'payment_methods', - 'section' => 'ppcp-card-payments-card', - 'modal' => 'ppcp-credit-card-gateway', + 'type' => 'tab', + 'tab' => 'payment_methods', + 'section' => 'ppcp-credit-card-gateway', + 'highlight' => 'ppcp-credit-card-gateway', + 'modal' => 'ppcp-credit-card-gateway', ), 'showWhen' => 'enabled', 'class' => 'small-button', @@ -147,9 +147,10 @@ class FeaturesDefinition { 'type' => 'secondary', 'text' => __( 'Configure', 'woocommerce-paypal-payments' ), 'action' => array( - 'type' => 'tab', - 'tab' => 'payment_methods', - 'section' => 'ppcp-alternative-payments-card', + 'type' => 'tab', + 'tab' => 'payment_methods', + 'section' => 'ppcp-alternative-payments-card', + 'highlight' => 'ppcp-alternative-payments-card', ), 'showWhen' => 'enabled', 'class' => 'small-button', @@ -178,10 +179,11 @@ class FeaturesDefinition { 'type' => 'secondary', 'text' => __( 'Configure', 'woocommerce-paypal-payments' ), 'action' => array( - 'type' => 'tab', - 'tab' => 'payment_methods', - 'section' => 'ppcp-card-payments-card', - 'modal' => 'ppcp-googlepay', + 'type' => 'tab', + 'tab' => 'payment_methods', + 'section' => 'ppcp-card-payments-card', + 'highlight' => 'ppcp-googlepay', + 'modal' => 'ppcp-googlepay', ), 'showWhen' => 'enabled', 'class' => 'small-button', @@ -216,10 +218,11 @@ class FeaturesDefinition { 'type' => 'secondary', 'text' => __( 'Configure', 'woocommerce-paypal-payments' ), 'action' => array( - 'type' => 'tab', - 'tab' => 'payment_methods', - 'section' => 'ppcp-card-payments-card', - 'modal' => 'ppcp-applepay', + 'type' => 'tab', + 'tab' => 'payment_methods', + 'section' => 'ppcp-card-payments-card', + 'highlight' => 'ppcp-applepay', + 'modal' => 'ppcp-applepay', ), 'showWhen' => 'enabled', 'class' => 'small-button',