How to Customize Barcode Size – Modify WPCargo Barcode Width & Height

Use the following hooks to adjust wpcargo’s barcode size.

  • To adjust the height:
    
    function custom_wpcargo_barcode_url_height( )
    
    {
    
    return 80;
    
    }
    
    
    
    
    add_filter( 'wpcargo_barcode_url_height', 'custom_wpcargo_barcode_url_height', 999 );
    
    
  • To adjust the width:
    
    function custom_wpcargo_barcode_url_width( )
    
    {
    
    return 2;
    
    }
    
    
    
    
    add_filter( 'wpcargo_barcode_url_width', 'custom_wpcargo_barcode_url_width', 999 );
    
    
2
    2
    Your Cart
    Remove
    WPCargo Shipment Rate
    1 X $79.00 = $79.00
    Remove
    WPCargo Shipping Rate Package
    2 X $340.90 = $681.80