Allow custom menu ordering when set by another filter
This fixes the case where another plugin sets custom menu ordering to be true, but its filter runs before WooCommerce's filter. Otherwise WooCommerce's filter will return false, and disallow the other plugin to customize its menu items.
This commit is contained in:
parent
b9cdc760ac
commit
0e1ec203cd
|
@ -215,10 +215,11 @@ class WC_Admin_Menus {
|
|||
/**
|
||||
* Custom menu order.
|
||||
*
|
||||
* @param bool $enabled Whether custom menu ordering is already enabled.
|
||||
* @return bool
|
||||
*/
|
||||
public function custom_menu_order() {
|
||||
return current_user_can( 'manage_woocommerce' );
|
||||
public function custom_menu_order( $enabled ) {
|
||||
return $enabled || current_user_can( 'manage_woocommerce' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue