add_action( 'woocommerce_check_cart_items', 'fc_set_min_total_cart_quantity' );
function fc_set_min_total_cart_quantity() {
    // Only apply to the checkout and cart pages
    if ( is_cart() || is_checkout() ) {
        
        // Get the total number of items in the cart
        $cart_total_quantity = WC()->cart->get_cart_contents_count();
        
        // Set your minimum requirement
        $minimum_required = 500;
        
        if ( $cart_total_quantity < $minimum_required ) {
            // Display an error message on the site
            wc_add_notice( 
                sprintf( 'A minimum total of <strong>%s</strong> items is required to place an order. Current items in cart: %s.', 
                    $minimum_required, 
                    $cart_total_quantity 
                ), 
                'error' 
            );
        }
    }
}<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://fcscricket.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://fcscricket.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://fcscricket.com/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://fcscricket.com/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://fcscricket.com/wp-sitemap-taxonomies-product_tag-1.xml</loc></sitemap><sitemap><loc>https://fcscricket.com/wp-sitemap-taxonomies-pa_size-1.xml</loc></sitemap></sitemapindex>
