Created
March 28, 2015 11:35
-
-
Save kloon/b9723a38d86636919da2 to your computer and use it in GitHub Desktop.
WooCommerce PDF Watermark change pdf password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wc_pdf_watermark_change_pdf_password( $order_id, $product_id ) { | |
// Use the order number for the password instead of the billing email | |
$order = wc_get_order( $order_id ); | |
return $order->get_order_number(); | |
} | |
add_filter( 'woocommerce_pdf_watermark_file_password', 'wc_pdf_watermark_change_pdf_password' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment