I just tested this and it works fine for me. I used this, which is exactly the same as your code:
add_filter( 'wpo_wcpdf_paper_orientation', 'wcpdf_landscape', 10, 2 );
function wcpdf_landscape($paper_orientation, $template_type) {
// use $template type ( 'invoice' or 'packing-slip') to set paper oriention for only one document type.
if ($template_type == 'packing-slip') {
$paper_orientation = 'landscape';
}
return $paper_orientation;
}
add_filter( 'wpo_wcpdf_paper_format', 'wcpdf_a5_packing_slips', 10, 2 );
function wcpdf_a5_packing_slips($paper_format, $template_type) {
if ($template_type == 'packing-slip') {
$paper_format = 'b5';
}
return $paper_format;
}
Do note that you have limited this to the packing slip, which means the invoice will be in the standard format. If you want to apply this to all documents, use the following code:
add_filter( 'wpo_wcpdf_paper_orientation', 'wcpdf_landscape', 10, 2 );
function wcpdf_landscape($paper_orientation, $template_type) {
return 'landscape';
}
add_filter( 'wpo_wcpdf_paper_format', 'wcpdf_a5', 10, 2 );
function wcpdf_a5($paper_format, $template_type) {
return 'b5';
}