Hi @ecros
If you remove that custom code snippet you added to get images to show up, does the plugin work then?
Thread Starter
ecros
(@ecros)
Hi @dkjensen no sir, it does not fix it. I still see the same message. I cleared the cache just to be sure.
@ecros Are you able to look at your site error logs and paste in the error you are seeing?
Thread Starter
ecros
(@ecros)
@dkjensen This is what I see in the error log:
2024-08-28 18:10:47 UTC [nginx][error] 76500#0: *941065 openat() “www/huskytrailerstx.com/public_html/.well-known/traffic-advice” failed (2: No such file or directory), client: 74.125.212.199, server: huskytrailerstx.com, request: “GET /.well-known/traffic-advice HTTP/1.1”, host: “huskytrailerstx.com”
2024-08-28 17:11:13 UTC [nginx][error] 22919#0: *922165 openat() “www/huskytrailerstx.com/public_html/.well-known/traffic-advice” failed (2: No such file or directory), client: 74.125.212.200, server: huskytrailerstx.com, request: “GET /.well-known/traffic-advice HTTP/1.1”, host: “huskytrailerstx.com”
2024-08-28 16:27:10 UTC [apache][access_compat:error] [pid 60672] [client 34.174.60.197:12136] AH01797: client denied by server configuration: /www/huskytrailerstx.com/public_html/wp-content/uploads/woocommerce_uploads/
Thread Starter
ecros
(@ecros)
@dkjensen in the Woocommerce > status > logs:
2024-08-28T12:42:12+00:00 Info Lock (updraft_lock_wpo_wcpdf_invoice_semaphore_lock, djr_options) acquired 2024-08-28T12:42:12+00:00 Info Lock acquired for the invoice number init.
It repeats those two errors over and over.
@ecros Those errors are unrelated to the WC Cart PDF plugin. The errors in WooCommerce > status > logs are related to this plugin.
You could edit your wp-config.php file and add/modify the following:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
Which will display the errors on the screen instead of giving you the There has been a critical error on this website notice, however other errors might display on other pages of your site so this may not be the best solution on a production site.
Your hosting provider should have some sort of interface to view all errors, what I would do is trigger the error, then immediately refresh and open the logs, it should be one of the most recent error entries in your log, that way you do not have to fish through so many unrelevant errors.
Thread Starter
ecros
(@ecros)
@dkjensen I set up a stagint site to work on:
-
This reply was modified 1 hour, 57 minutes ago by
ecros.
Thread Starter
ecros
(@ecros)
@dkjensen After turning on debugging it display this: Fatal error: Uncaught ArgumentCountError: Too few arguments to function woodmart_enqueue_emails_styles(), 1 passed in /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/functions.php:2578 Stack trace: #0 /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-includes/class-wp-hook.php(324): woodmart_enqueue_emails_styles(‘.wc_cart_pdf_te…’) #1 /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘.wc_cart_pdf_te…’, Array) #2 /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-content/plugins/wc-cart-pdf/wc-cart-pdf.php(180): apply_filters(‘woocommerce_ema…’, ‘.wc_cart_pdf_te…’) #3 /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-includes/class-wp-hook.php(324): wc_cart_pdf_process_download(”) #4 /home/customer/www/staging2.huskytrail in /home/customer/www/staging2.huskytrailerstx.com/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/functions.php on line 2578
Thread Starter
ecros
(@ecros)
@dkjensen This is line 2578:
function woodmart_enqueue_emails_styles( $css, $email ) { $woodmart_emails_list = apply_filters( 'woodmart_emails_list', array() );
if ( in_array( get_class( $email ), $woodmart_emails_list, true ) ) {
ob_start();
wc_get_template( 'emails/wd-email-styles.php' );
$css .= ob_get_clean();
}
return $css;
}
add_filter( 'woocommerce_email_styles', 'woodmart_enqueue_emails_styles', 10, 2 );
}
@ecros Are you able to check if there are theme updates available and if so, update the theme?
@ecros Would you mind trying uploading this version of WC Cart PDF plugin on your staging environment and let me know if it fixes the issue for you?
Thread Starter
ecros
(@ecros)
@dkjensen That seems to do most of it! I’m just missing the logo, but the PDF now shows up, the cart is correct and the product image, title and price are all correct.
Thread Starter
ecros
(@ecros)
@dkjensen I think you nailed it, whatever magic you worked! I corrected the logo link and it appears everything is back the wa y it should be.
@ecros Awesome glad to hear that! I will release an official update here tomorrow but in the meantime feel free to use the version I sent.
