Merge pull request #20856 from woocommerce/fix/custom-menu-order

Allow custom menu ordering when set by another filter
This commit is contained in:
Gerhard Potgieter 2018-07-25 13:55:58 +02:00 committed by GitHub
commit 20a6c40bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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' );
}
/**