• [X] I have carried out troubleshooting steps and I believe I have found a bug.
  • [X] I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

When either adding or updating a shipping class or zone within WooCommerce > Settings > Shipping the wcadmin_settings_change track is not being triggered.

Expected behavior

wcadmin_settings_change track event should be triggered when adding/updating shipping zones and classes.

Actual behavior

Only the wcadmin_settings_view is triggered for the shipping zones and classes tab, but no settings_change track is being triggered. wcadmin_settings_change is being triggered when updating the shipping options under WooCommerce > Settings > Shipping.

Steps to reproduce

  1. Install WooCommerce and WooCommerce beta tester
  2. Make sure logging is enabled under WooCommerce > Settings > Advanced >
  3. Go to WooCommerce > Settings > Shipping and add a new shipping zone and a new shipping class
  4. Go to WooCommerce > Status > Logs and select the log starting with tracks-2022-.... for today's date (this is added by the WooCommerce beta tester)
  5. Notice how only the wcadmin_settings_view track is triggered for the shipping zone and class pages but no wcadmin_settings_change
  6. Try updating a shipping option under WooCommerce > Settings > Shipping > Shipping options and check the logs again, notice how wcadmin_settings_change is triggered now.

WordPress Environment

WooCommerce version: 6.9.0 WordPress: 6.0.1

Isolating the problem

  • [X] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • [X] This bug happens with a default WordPress theme active, or Storefront.
  • [X] I can reproduce this bug consistently using the steps above.

The old AJAX calls we do in the Settings section are not being tracked. The only exceptions are the calls we do in the Payments tab, since we added the code necessary to start tracking them a few months ago.

We're using that kind of call when navigating sub-tabs. It's not being used on every sub-tab though.

Currently, the tabs/sub-tabs that are using the old AJAX are:

  • Tax > Standard rates | Reduced rate rates | Zero rate rates
  • Shipping > Shipping zones | Shipping classes
  • Advanced > REST API

I'm going to remove the bug label.


@pmcpinto could you review the priority of this change, please? As per the comment above, it is a "feature request".

© 2022 - All rights reserved.