kreamweb
10/27/2017 - 9:29 AM

[request a quote] crypt pdf file name hooks

from version 1.8.0

<?php

if ( class_exists( 'YITH_Request_Quote_Premium' ) ) {
	 /*
	  * If you want change old pdf name when create pdf
	  */

	 add_action( 'create_pdf', 'ywraq_add_crypt_old_quote', 90 );

	function ywraq_add_crypt_old_quote( $order_id ) {
		$order = wc_get_order( $order_id );
		//change 'yes' in false if you don't want crypt file names
		yit_save_prop( $order, '_ywraq_pdf_crypt', 'yes' );
	}
}

/*
* If you want ever old pdf file name 
*/
add_filter( 'ywraq_pdf_file_name_crypt', '__return_false');