diff --git a/includes/functions.php b/includes/functions.php
index c62b8369c96a0b07d0902f9ff250ff12d8703d84..08d7271631051159fbff94d47d758e09f443f1f8 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -60,7 +60,7 @@ function validate_args( $args ) {
  * @return bool
  */
 function is_command_allowed( $command ) {
-	return in_array( $command, get_command_whitelist(), true ) && ! in_array( $command, get_command_blacklist(), true );
+	return ! in_array( $command, get_command_blacklist(), true ) && in_array( $command, get_command_whitelist(), true );
 }
 
 /**