How to change shipment document paper size.

Add this to your child theme’s functions.php:


add_filter( 'wpcfe_print_paper_size', 'custom_paper_size_orientation' );
function custom_paper_size_orientation( $sizes ){
	//Change size and orientation of Label
	$sizes['label']['size'] = 'A6';
	$sizes['label']['orient'] = 'portrait';
       
     $sizes = array(
		  'label' => array(
            'size' => array(0,0,600,841.89),
            'orient' => 'portrait'
        ),);
	
	//Change size and orientation of Invoice
	$sizes['invoice']['size'] = 'Letter';
	$sizes['invoice']['orient'] = 'portrait';
       
        $sizes = array(
		  'invoice' => array(
            'size' => array(0,0,600,841.89),
            'orient' => 'portrait'
        ),);
	
	//Change size and orientation of BOL
	$sizes['bol']['size'] = 'A4';
	$sizes['bol']['orient'] = 'portrait';

        $sizes = array(
		  'bol' => array(
            'size' => array(0,0,600,841.89),
            'orient' => 'portrait'
        ),);
	

        //Change size and orientation of Waybill
	$sizes['waybill']['size'] = 'A4';
	$sizes['waybill']['orient'] = 'landscape';

         $sizes = array(
		  'waybill' => array(
            'size' => array(0,0,600,841.89),
            'orient' => 'portrait'
        ));

	
	return $sizes;
}

3
    3
    Your Cart
    Remove
    WPCargo Parcel Quotation Package
    1 X $333.90 = $333.90
    Remove
    WPCargo Shipping Rate Package
    2 X $340.90 = $681.80
    Remove
    WPCargo Receiving Add-ons
    1 X $29.00 = $29.00