Code doesn’t work inside of Code Snippets but no problem in functions.php
-
Hi there, I tried adding this code and it crashed my site:
add_filter('wpo_wcpdf_tmp_path', function( $tmp_base ) { /* * This is an example of a path, please check your current server directory structure. * It's recommended to have it outside the /public/ directory. */ $tmp_base = '/home/domains/yourdomain.com/woocommerce-invoices/'; return $tmp_base; });
I was just following instructions here:
https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/protect-the-attachments-directory-on-nginx/The code works fine in
functions.php
. Any idea why?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Code doesn’t work inside of Code Snippets but no problem in functions.php’ is closed to new replies.