Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2934446
Fatal error on site when adding composite to cart
Closed

Comments

  • Andrew started the conversation

    We have a composite product setup on our WP woocommerce site which has been working well.  This has just two days ago developed an error when the user tries to add to the Cart.

    the following is the error trace to the Fatal Error:-

    Notice: Undefined index: captcha_wc_lost_password in /home/excellentedges/public_html/wp-content/plugins/no-captcha-recaptcha-for-woocommerce/lost-password.php on line 11

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Accepted_Payment_Methods has a deprecated constructor in /home/excellentedges/public_html/wp-content/plugins/woocommerce-accepted-payment-methods/accepted-payment-methods.php on line 186

    Notice: acf_get_value was called incorrectlyAdvanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/excellentedges/public_html/wp-includes/functions.php on line 5663

    Deprecated: Function create_function() is deprecated in /home/excellentedges/public_html/wp-content/themes/teahouse/templatemela/widgets/tmpmela-follow-us.php on line 218

    Deprecated: Function create_function() is deprecated in /home/excellentedges/public_html/wp-content/themes/teahouse/templatemela/widgets/tmpmela-footer-aboutus.php on line 89

    Deprecated: Function create_function() is deprecated in /home/excellentedges/public_html/wp-content/themes/teahouse/templatemela/widgets/tmpmela-footer-services.php on line 92

    Deprecated: Function create_function() is deprecated in /home/excellentedges/public_html/wp-content/themes/teahouse/templatemela/widgets/tmpmela-left-banner.php on line 70

    Deprecated: Function create_function() is deprecated in /home/excellentedges/public_html/wp-content/themes/teahouse/templatemela/widgets/tmpmela-static-links.php on line 178

    Deprecated: Function create_function() is deprecated in /home/excellentedges/public_html/wp-content/themes/teahouse/templatemela/widgets/tmpmela-advance-search.php on line 77

    Notice: Undefined index: data in /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 688

    Fatal error: Uncaught Error: Call to a member function get_stock_managed_by_id() on null in /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php:689 Stack trace: #0 /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1218): WC_Cart->get_cart_item_quantities() #1 /home/excellentedges/public_html/wp-content/plugins/wpc-composite-products/wpc-composite-products.php(1657): WC_Cart->add_to_cart(5310, 1, 5313, Array, Array) #2 /home/excellentedges/public_html/wp-content/plugins/wpc-composite-products/wpc-composite-products.php(1613): WPCleverWooco->wooco_add_to_cart_items(Array, '879330b40c150f6...', 11924, 1) #3 /home/excellentedges/public_html/wp-includes/class-wp-hook.php(303): WPCleverWooco->wooco_add_to_cart('879330b40c150f6...', 11924, 1, 0, Array, Array) #4 /home/excellentedges/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array) #5 /home/excellentedges/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Arra in /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 689

    There has been a critical error on this website.


  •  767
    Janilyn replied

    Hi Andrew,

    Thank you for contacting WPClever Support Forum. We’ve received your ticket. 

    However, the description is not enough for us to find the cause of the problem. Please provide us with a link to your published composite product for checking? 

    There might be something conflicting with our plugin. I have checked the latest version on our test site and live demo, everything is fine. You can check it here: https://demo.wpclever.net/wooco/.

    After receiving your information, I'll send it to our developers to help you check that.

    Best regards. 

    Janilyn T. - WPClever Support Agent

  • Andrew replied

    Links to the two composite products (currently made private but the direct links work fine) are as follows

    First Edge Scissor Kit (Right Hand)

    https://www.excellentedges.com/product/first-edge-kit/


    First Edge Scissor Kit (Left Hand)

    https://www.excellentedges.com/product/first-edge-kit-left-hand/

    I cannot provide any more detail as the error on the screen is limited to the text I sent in the original ticket.

    Please do put a high priority on this as we are currently unable to list our most significant product on the store.

    Cheers.

    Andy

  • Andrew replied

    Latest log of error.  What is also noticed is the error must happen when creating the second composite as when you successfully add a product to the cart, the cart shows with the FIRST EDGE KIT with the first composite only added.

    [09-Dec-2021 12:04:48 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_stock_managed_by_id() on null in /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php:689
    Stack trace:
    #0 /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1218): WC_Cart->get_cart_item_quantities()
    #1 /home/excellentedges/public_html/wp-content/plugins/wpc-composite-products/wpc-composite-products.php(1657): WC_Cart->add_to_cart(5310, 1, 5313, Array, Array)
    #2 /home/excellentedges/public_html/wp-content/plugins/wpc-composite-products/wpc-composite-products.php(1613): WPCleverWooco->wooco_add_to_cart_items(Array, '879330b40c150f6...', 11924, 1)
    #3 /home/excellentedges/public_html/wp-includes/class-wp-hook.php(303): WPCleverWooco->wooco_add_to_cart('879330b40c150f6...', 11924, 1, 0, Array, Array)
    #4 /home/excellentedges/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #5 /home/excellentedges/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Arra in /home/excellentedges/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 689

  •  767
    Janilyn replied

    Hi Andrew,

    Thanks for the details. 

    I have transferred your ticket to one of our developers so that he can check and give you further help. He might need to further discuss with you, so please be in touch.

    He'll start working on this and will be responding as soon as he's available for support. 

    Please stay patient meanwhile cause this might take some time under our current heavy workloads.

    Best regards.

    -----------

    PS: Since once a ticket is assigned to a developer, other members in our team cannot read or receive comments anymore, in case you would like us to help you update the progress of your ticket, kindly submit a new ticket so that our Support Agent can help you check and urge the assigned developer to reach back soon.

    Janilyn T. - WPClever Support Agent

  •  1,226
    Dustin replied

    Hi Andrew,

    Both of your products are not found or private and I can't check:

    https://www.excellentedges.com/product/first-edge-kit/
    https://www.excellentedges.com/product/first-edge-kit-left-hand/

    Please send me your website credentials (wp-admin link, username, password) then I can check and fix it for you. You also can create a dev/staging site with the same configurations then I'll work on it.

    Best regards,
    Dustin

  • Andrew replied

    For now I don't have the ability to offer admin access and we don't have a staging site but I have enabled password access to the product pages for which the links were provided before.

    https://www.excellentedges.com/product/first-edge-kit/
    https://www.excellentedges.com/product/first-edge-kit-left-hand/

    Password: #eetest

    Cheers.


  • Andrew replied

    Is it possible to download a previous version of the WPC Composite Product plugin to see if we have introduced the error with an automatic update?  This appears likely as it was working and we have not made any changes to trigger this issue.  Cheers.

  •  1,226
    Dustin replied

    If you're using the free version, you can download previous versions here https://wordpress.org/plugins/wpc-composite-products/advanced/

    Best regards,
    Dustin

  • Andrew replied

    We have the premium version, however I have rolled back to version 4.0.8 and the error no longer appears.  So that would suggest that there is an issue that has been introduced since 4.0.8.  I have also turned off the automatic update to ensure we remain on a stable version.  If there is a upgrade that addresses this reported issue then please let us know and we will test for you.  Cheers.  Andrew Doyle

  •  1,226
    Dustin replied

    Thank you so much for that information!

    Please update our plugin to the latest version 4.1.1 and try again. I think it should work as same as 4.0.8

    Best regards,
    Dustin

  • Andrew replied

    Dustin,

    Since resolving this issue by rolling back to version 4.0.8, we have inadvertently upgraded to the latest version 4.1.5 and encountered the same error.  Can you please confirm if this is something you can support with a fix in the next version.  Cheers.

    Andrew

  •  1,226
    Dustin replied

    So strangefrown.png No one reports the same issue with you so I can't reproduce the problem to check and fix it.

    Could you please create a dev/staging site with the same configurations then I'll work on it? If not, you can use this plugin https://wordpress.org/plugins/all-in-one-wp-migration/ to export your site and send me the exported file. I'll install it on my PC to check.

    Best regards,
    Dustin

  •  1
    vincent replied

    I have a similar issue since your latest update and while my entire site works fine, people are simply unable to purchase any of my composite products - they can however buy anything else they want. I have reported it last week end  and provided the staging area …