How to enable European decimal separator

Note: please copy and paste this code in functions.php of your current theme.

  function custom_calculate_weight_meta_callback( $weight ){
    if ( strpos($weight, ',' ) !== false ) {
        $weight= floatval( str_replace( ',', '.', str_replace('.', '', $weight) ) );
    }
    return $weight;
  }
  add_filter( 'wpcargo_calculate_weight_meta', 'custom_calculate_weight_meta_callback' );
  
0
    0
    Your Cart
    Your cart is emptyReturn to Shop