How to set minimum weight of order in woocommerce?

Solution:

Add this code to functions.php. You may check article here

 add_action( 'woocommerce_check_cart_items', 'cldws_set_weight_requirements' );
    function cldws_set_weight_requirements() {
     // Only run in the Cart or Checkout pages
     if( is_cart() || is_checkout() ) {
     global $woocommerce;
     // Set the minimum weight before checking out
     $minimum_weight = 500;
     // Get the Cart's content total weight
     $cart_contents_weight = WC()->cart->cart_contents_weight;
     // Compare values and add an error is Cart's total weight
     if( $cart_contents_weight < $minimum_weight  ) {
     // Display our error message
     wc_add_notice( sprintf('<strong>A Minimum Weight of %s%s is required before checking out.</strong>'
     . '<br />Current cart weight: %s%s',
     $minimum_weight,
     get_option( 'woocommerce_weight_unit' ),
     $cart_contents_weight,
     get_option( 'woocommerce_weight_unit' ),
     get_permalink( wc_get_page_id( 'shop' ) )
     ),
     'error' );
     }
     }
    }