Fix deprecated function warning for WP-CLI command