Hide discount table if customer is logged in

Hide the discount table when customers are logged in.

// Hide discount table if customer is logged in
add_action('advanced_woo_discount_rules_after_initialize', function () {
    if (class_exists('\Wdr\App\Router') && function_exists('is_user_logged_in') && is_user_logged_in()) {
        $position_to_show_bulk_table = \Wdr\App\Router::$manage_discount::$config->getConfig('position_to_show_bulk_table', 'woocommerce_before_add_to_cart_form');
        if (has_action($position_to_show_bulk_table, array(\Wdr\App\Router::$manage_discount, 'showBulkTableInPosition'))) {
            remove_action($position_to_show_bulk_table, array(\Wdr\App\Router::$manage_discount, 'showBulkTableInPosition'));
        }
    }
});