• Resolved Rhand

    (@rhand)


    We are getting timeouts on WooCommerce checkout or empty response. Latest error log shows

    [20-Feb-2023 01:07:51 UTC] wc_get_product was called incorrectly. wc_get_product moet niet worden opgeroepen voordat de acties woocommerce_init, woocommerce_after_register_taxonomy en woocommerce_after_register_post_type zijn voltooid. Backtrace: require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WooCommerce->init, wc_load_cart, WooCommerce->initialize_cart, WC_Customer->__construct, WC_Data_Store->read, WC_Customer_Data_Store->read, WC_Data->read_meta_data, WC_Data->init_meta_data, maybe_unserialize, unserialize, WC_Data->__wakeup, WC_Product_Variation->__construct, WC_Product_Simple->__construct, WC_Product->__construct, WC_Data_Store->read, WC_Product_Variation_Data_Store_CPT->read, WC_Product_Variation_Data_Store_CPT->generate_attribute_summary, wc_get_formatted_variation, wc_attribute_label, wc_get_product, wc_doing_it_wrong. This message was added in version 3.9.
    [20-Feb-2023 01:07:52 UTC] PHP Deprecated:  Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wp-includes/Requests/Cookie/Jar.php on line 63
    

    Console log shows

    Failed to load resource: The network connection was lost.

    for url

    https://site.nl/?wc-ajax=checkout&elementor_page_id=782

    I turned off most plugins except for needed Fancy Product Designer , Elementor Pro and WooCommerce

    ### Active Plugins (8) ###
    
    The SEO Framework: door The SEO Framework Team – 4.2.7.1
    Elementor Pro: door Elementor.com – 3.11.1
    Elementor: door Elementor.com – 3.11.1
    Fancy Product Designer PRO Export: door fancyproductdesigner.com – 1.3.1
    Fancy Product Designer: door fancyproductdesigner.com – 4.7.9
    Loco Translate: door Tim Whitlock – 2.6.3
    WooCommerce: door Automattic – 7.4.0
    WPForms Lite: door WPForms – 1.8.0.1

    and still seeing this error. Opened a ticket with Fancy Product Designer as well but trying to debug here myself. Url on XHR request showing Elementor page ID in url is also odd.

    Last test this morning got the failed to load resource error, but order was received and email sent to admin. Very odd.

    Second test we got

    Your Session is Expired

    We only have payment on delivery and we were wonderring if upsell code of Fancy Product Designer was causing issues.. but so still testing

    If anyone has any ideas how to debug this further let me know.

    • This topic was modified 2 years ago by Rhand.
    • This topic was modified 2 years ago by Rhand.
    • This topic was modified 2 years ago by Rhand.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Rhand

    (@rhand)

    Just did a test in Firefox and order did get placed but I did see these errors

    Cookie “woocommerce_items_in_cart” has been rejected because it is already expired. site
    Some cookies are misusing the recommended “SameSite“ attribute 3
    Cookie “woocommerce_cart_hash” has been rejected because it is already expired. site
    This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. 2562

    On the cookie complaint I also got details:

    Cookie “woocommerce_cart_hash” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite site.nl
    Cookie “woocommerce_items_in_cart” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite site.nl
    Cookie “woocommerce_cart_hash” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite site.nl

    We also asked the hoster transip.nl for some feedback as the header showed a load balancer which may cause issues with connectivity or cookies

    HTTP/1.1 200 OK
    Date: Tue, 21 Feb 2023 03:30:44 GMT
    Server: Apache
    Access-Control-Allow-Origin: https://site.nl
    Access-Control-Allow-Credentials: true
    X-Content-Type-Options: nosniff
    X-Robots-Tag: noindex
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Transfer-Encoding: chunked
    Content-Type: application/json; charset=UTF-8
    X-TransIP-Backend: web905
    X-TransIP-Balancer: balancer5

    Started wondering about the server after reading https://github.com/woocommerce/woocommerce/issues/17292#issuecomment-338464116

    Did do another order in Safari after the above and all worked well too and no warnings nor errors.. odd. Will keep ticket open for now.

    • This reply was modified 2 years ago by Rhand.
    • This reply was modified 2 years ago by Rhand.
    • This reply was modified 2 years ago by Rhand.
    • This reply was modified 2 years ago by Rhand.
    Roxy

    (@roxannestoltz)

    Hi @rhand ,

    Thanks for reaching out, and glad to hear that this GitHub issue helped produce successful results with no errors or warnings!

    Should the issue return, you can check that you have the latest version of WooCommerce installed, and make sure that any custom code added to your site, is properly integrated, as the error message related to the wc_get_product function suggests that there may be outdated code in your WooCommerce installation or otherwise conflicting code.

    Additionally, you can contact your hosting provider to see if there are any known issues with the load balancer or server that could be causing the issue.

    Lastly, I understand that you have deactivated some plugins however I’d suggest performing a full conflict test to rule out any theme/plugin conflicts, as there could be a theme/plugin conflict causing this issue.

    Hope this helps!

    Roxy

    (@roxannestoltz)

    Hi @rhand ,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – feel free to create a new topic? should you need any further help.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Checkout Placing Order: The network connection was lost.’ is closed to new replies.