Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
86 stars 32 forks source link

Navigation-related code is causing deprecation warnings in debug log #674

Closed mattsherman closed 1 month ago

mattsherman commented 2 months ago

Describe the bug

The Navigation feature has been removed from WooCommerce and the related code will be removed in the future. Currently, deprecation warnings are being logged whenever an admin page is rendered:

Automattic\WooCommerce\Admin\Features\Navigation\Menu::add_plugin_item is deprecated since 9.3 with no alternative. Navigation classes will be removed in WooCommerce 9.4
Automattic\WooCommerce\Admin\Features\Navigation\Screen::register_post_type is deprecated since 9.3 with no alternative. Navigation classes will be removed in WooCommerce 9.4

This is due to the following code:

https://github.com/Automattic/woocommerce-subscriptions-core/blob/36e21730f5f322c4fed3f17707334be72dfd552d/includes/admin/class-wcs-wc-admin-manager.php#L74-L96

To Reproduce

  1. Activate WooCommerce Subscriptions
  2. Load an admin page
  3. Note that deprecation messages are in debug log

Expected behavior

Navigation-related code will be removed and no deprecation warnings will be logged.

Actual behavior

Deprecation warnings are logged.

Product impact

Additional context

chrism245 commented 1 month ago

8729143-zen

nicdwilson commented 1 month ago

8731994-zd-a8c

shrutimoorthy commented 1 month ago

8732890-zen