Skip to content

Instantly share code, notes, and snippets.

@bogdan-mainwp
Last active January 12, 2021 11:14
Show Gist options
  • Save bogdan-mainwp/e892767b2ebf9bd2823eb7505e032d77 to your computer and use it in GitHub Desktop.
Save bogdan-mainwp/e892767b2ebf9bd2823eb7505e032d77 to your computer and use it in GitHub Desktop.
Custom code snippet for setting the custom paper size for the client report PDF.
<?php
// Add the following code snippet to the functions.php file of the MainWP Customisations plugin
// Download MainWP Customisations here: https://github.com/mainwp/mainwp-customisations
// More about the plugin: https://mainwp.com/mainwp-customisations/
add_filter( 'mainwp_client_report_pdf_page_format', 'mycustom_pdf_page_format', 10 , 1 );
function mycustom_pdf_page_format( $format = '' ) {
return 'A4';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment