Skip to content

Instantly share code, notes, and snippets.

@wpweb101
Last active September 28, 2015 13:06
Show Gist options
  • Select an option

  • Save wpweb101/c466ebe4fd10393d2ed1 to your computer and use it in GitHub Desktop.

Select an option

Save wpweb101/c466ebe4fd10393d2ed1 to your computer and use it in GitHub Desktop.
woocommerce pdf voucher - Add Custom Pdf size
<?php
// For add custom PDF
function woo_vou_add_custom_pdf_sizes( $pdf_sizes = array() ) {
$pdf_sizes = array_merge( $pdf_sizes, array(
'A_Custom' => array(
'width' => 500,
'height' => 500,
'fontsize' => 50
)
)
);
return $pdf_sizes;
}
add_filter( 'woo_vou_get_pdf_sizes', 'woo_vou_add_custom_pdf_sizes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment