• Resolved bonturicasa

    (@bonturicasa)


    Hello,

    After installing woocommerce last update I noticed my checkout page stopped working properly, the checkout button only refreshes the page, the order is processed and shows in backend but the customer has no notice of it and no email is sent.

    I’m running on wordpress 5.6.1, FCF 2.9.2, woocommerce 5.0.0.

    When disabling FCF everything turns back to normal. When enabling FCF the following notice appears on debug mode:

    [19-Feb-2021 08:41:00 UTC] PHP Fatal error Uncaught Error: Call to a member function get_id() on null in /home/rdhqsbba/public_html/wp-content/plugins/flexible-checkout-fields/inc/wpdesk-woo27-functions.php:115
    
    Stack trace:
    
    #0 /home/rdhqsbba/public_html/wp-content/plugins/flexible-checkout-fields/classes/display-options.php(60): wpdesk_get_order_id(NULL)
    #1 /home/rdhqsbba/public_html/wp-includes/class-wp-hook.php(289): Flexible_Checkout_Fields_Disaplay_Options->email_additional_information_fields(NULL)
    #2 /home/rdhqsbba/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #3 /home/rdhqsbba/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #4 /home/rdhqsbba/public_html/wp-content/plugins/email-template-customizer-for-woo/includes/email-render.php(841): do_action('woocommerce_ema...', NULL, NULL, NULL, NULL)
    #5 /home/rdhqsbba/public_html/wp-content/plugins/email-template-customizer-for-woo/includes/email-render.php(274): VIWEC\INC\Email_Render->render_html_wc_hook(Array)
    #6 /home/rdhqsbba/public_html/wp-in in /home/rdhqsbba/public_html/wp-content/plugins/flexible-checkout-fields/inc/wpdesk-woo27-functions.php on line 115

    I can’t leave my website on maintenance for too long, please help!

    Thank you in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bonturicasa

    (@bonturicasa)

    Hello, anyone?

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @bonturicasa

    I set up the same test installation (WP+WooCommerce+FCF) and did not reproduce this error.
    Please run a quick troubleshooting and see if this behavior is due to a conflict.

    Troubleshooting steps

    1. Test the plugin using Storefront – official WooCommerce theme. It will help us identify a possible conflict with your theme.
    2. Disable plugins which are not ours or WooCommerce.
    3. Then enable plugins one by one and check if the issue still exists.

    Please let me know about the result.

    Thread Starter bonturicasa

    (@bonturicasa)

    Hello @tomaszwp,

    Yes the error was due to a conflict with Email Template Customizer for Woocommerce.

    I removed the order meta custom fields hook from admin’s email notification and now the checkout is working again, but strangely FCF fields are showing only in default email, if I try to customize the email with FCF hooks the following error is displayed on top of the fields:
    Warning: DOMXPath::query(): Invalid expression in /home/rdhqsbba/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php on line 494

    Warning: Invalid argument supplied for foreach() in /home/rdhqsbba/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php on line 503

    For the moment I’ll solve it using woocommerce default emails, but I would be curious to know if anybody had the same problem and how they solved it!

    Regards,

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @bonturicasa

    I am sorry but both plugins will not work together.

    FCF fields can be output in the email template with the code below.

    echo $order->get_meta( 'meta_name');

    Displaying values of fields using custom PHP code – for advanced users

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    I am marking this topic as resolved as we have not received any new replies.

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

The topic ‘PHP fatal error on checkout’ is closed to new replies.