• Ben

    (@6970design)


    Hi – having an issue with the plugin throwing a critical error at checkout of any order.

    The include_css_for_emails() method in the YITH_YWGC_Emails class is being called with only 1 argument, but it expects 2. This is breaking email sending during checkout, it’s triggered when Stripe tries to send the new order confirmation email.

    The issue is at line 239 of /wp-content/plugins/yith-woocommerce-gift-cards/includes/class-yith-ywgc-emails.php.

    Is there a fix for this? Don’t want to have to replace the plugin. We are using 4.29.0. Woo version 10.3.5, WordPress 6.8.3, PHP 8.1.33.

    thanks

    • This topic was modified 6 months, 1 week ago by Ben.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello there,
    thanks for contacting us!

    That function is called with two arguments, so the error you’re getting is unusual. Could you please send us the full details of the error?

    We’ll be waiting for your reply.

    Best regards.

    Thread Starter Ben

    (@6970design)

    Hi – thanks for the reply. Here’s the error:

    [20-Nov-2025 11:30:39 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function YITH_YWGC_Emails::include_css_for_emails(), 1 passed in /home/(domain-name)/public_html/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /home/(domain-name)/public_html/wp-content/plugins/yith-woocommerce-gift-cards/includes/class-yith-ywgc-emails.php:239

    thanks

    • This reply was modified 6 months, 1 week ago by Ben.
    Thread Starter Ben

    (@6970design)

    Hi – was there any update on this? Thanks.

    Juan Coronel

    (@juaancmendez)

    Hello there,

    I’m having trouble reproducing the error. Could you confirm if this only happens with the Stripe payment method? If so, which plugin are you using?

    Please let us know.

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Critical error’ is closed to new replies.