Add settings_section event prop for CES (https://github.com/woocommerce/woocommerce-admin/pull/6762)
* Add settings_section event prop for CES * Add changelog
This commit is contained in:
parent
5266784930
commit
f5b1d44e8c
|
@ -75,6 +75,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
|
||||||
|
|
||||||
== Unreleased ==
|
== Unreleased ==
|
||||||
|
|
||||||
|
- Tweak: Add settings_section event prop for CES #6762
|
||||||
- Fix: Retain persisted queries when navigating to Homescreen #6614
|
- Fix: Retain persisted queries when navigating to Homescreen #6614
|
||||||
- Update: Update choose niche note cta URL #6733
|
- Update: Update choose niche note cta URL #6733
|
||||||
- Fix: Update folded header style #6724
|
- Fix: Update folded header style #6724
|
||||||
|
|
|
@ -358,11 +358,20 @@ class CustomerEffortScoreTracks {
|
||||||
public function run_on_update_options() {
|
public function run_on_update_options() {
|
||||||
// $current_tab is set when WC_Admin_Settings::save_settings is called.
|
// $current_tab is set when WC_Admin_Settings::save_settings is called.
|
||||||
global $current_tab;
|
global $current_tab;
|
||||||
|
global $current_section;
|
||||||
|
|
||||||
if ( $this->has_been_shown( self::SETTINGS_CHANGE_ACTION_NAME ) ) {
|
if ( $this->has_been_shown( self::SETTINGS_CHANGE_ACTION_NAME ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$props = array(
|
||||||
|
'settings_area' => $current_tab,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( $current_section ) {
|
||||||
|
$props['settings_section'] = $current_section;
|
||||||
|
}
|
||||||
|
|
||||||
$this->enqueue_to_ces_tracks(
|
$this->enqueue_to_ces_tracks(
|
||||||
array(
|
array(
|
||||||
'action' => self::SETTINGS_CHANGE_ACTION_NAME,
|
'action' => self::SETTINGS_CHANGE_ACTION_NAME,
|
||||||
|
@ -373,9 +382,7 @@ class CustomerEffortScoreTracks {
|
||||||
'onsubmit_label' => $this->onsubmit_label,
|
'onsubmit_label' => $this->onsubmit_label,
|
||||||
'pagenow' => 'woocommerce_page_wc-settings',
|
'pagenow' => 'woocommerce_page_wc-settings',
|
||||||
'adminpage' => 'woocommerce_page_wc-settings',
|
'adminpage' => 'woocommerce_page_wc-settings',
|
||||||
'props' => (object) array(
|
'props' => (object) $props,
|
||||||
'settings_area' => $current_tab,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue