Skip to content

Commit

Permalink
Always return false if WC >= 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nmolham-godaddy committed Sep 30, 2024
1 parent d5223ad commit 4af7247
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions woocommerce/class-sv-wc-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1047,9 +1047,17 @@ public static function is_enhanced_admin_screen() : bool
*/
public static function is_wc_navigation_enabled() : bool
{
error_log('The Enhanced navigation feature has been deprecated since WooCommerce 9.3 with no alternative. Navigation classes will be removed in WooCommerce 9.4');
if (SV_WC_Plugin_Compatibility::is_wc_version_gte('9.3')) {
error_log('The Enhanced navigation feature has been deprecated since WooCommerce 9.3 with no alternative. Navigation classes will be removed in WooCommerce 9.4');

return false;
return false;
}

return is_callable([\Automattic\WooCommerce\Admin\Features\Navigation\Screen::class, 'register_post_type']) &&
is_callable([\Automattic\WooCommerce\Admin\Features\Navigation\Menu::class, 'add_plugin_item']) &&
is_callable([\Automattic\WooCommerce\Admin\Features\Navigation\Menu::class, 'add_plugin_category']) &&
is_callable([\Automattic\WooCommerce\Admin\Features\Features::class, 'is_enabled']) &&
\Automattic\WooCommerce\Admin\Features\Features::is_enabled('navigation');
}


Expand Down

0 comments on commit 4af7247

Please sign in to comment.