Critical error on cart / checkout “etheme_woocommerce_before_add_to_cart_quantity_with_type”

This topic has 7 replies, 2 voices, and was last updated 5 months, 1 weeks ago ago by Rose Tyler

  • Avatar: Enjin
    Enjin
    Participant
    November 24, 2023 at 11:53

    Hello,
    I have a critical issue after updating to latest version of the theme. I use the advanced cart/checkout page. When I try to access these pages, the layout is all broken and when I check the logs in my website, I see this :

    2023-11-24T10:28:22+00:00 CRITICAL Uancaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "etheme_woocommerce_before_add_to_cart_quantity_with_type" not found or invalid function name in /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php:324
    Stack trace:
    #0 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #1 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #2 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/templates/global/quantity-input.php(34): do_action()
    #3 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/u76641808...')
    #4 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1847): wc_get_template()
    #5 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/themes/xstore/woocommerce/checkout/review-order.php(97): woocommerce_quantity_input()
    #6 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/u76641808...')
    #7 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(2380): wc_get_template()
    #8 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(405): woocommerce_order_review()
    #9 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::update_order_review()
    #10 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #11 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #12 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(96): do_action()
    #13 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::do_wc_ajax()
    #14 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #15 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #16 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/template-loader.php(13): do_action()
    #17 /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-blog-header.php(19): require_once('/home/u76641808...')
    #18 /home/u766418081/domains/la-patte-angevine.fr/public_html/index.php(17): require('/home/u76641808...')
    #19 {main}
      thrown dans /home/u766418081/domains/la-patte-angevine.fr/public_html/wp-includes/class-wp-hook.php à la ligne 324

    Can you help ? seems to be theme related when I look at the error.

    I have another question but less urgent : I would like to remove the “a” link tag on the product tags of the product pages (single product) to be simply a p or div or span. Do you have any trick ?

    Thank you for your help !
    Best regards

    Please, contact administrator
    for this information.
    6 Answers
    Avatar: Enjin
    Enjin
    Participant
    November 24, 2023 at 12:08

    I actually did find in the meantime what caused my critical error, I overrided the woo.php file and when I deleted mine, it worked fine.

    So there’s only my secondary question left, about the tag on products tags 🙂

    Thank you

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 24, 2023 at 13:20

    Hello, Enjin,

    Thank you for contacting us and for using XStore.

    Adding the next custom CSS code into Theme Options > Theme custom CSS will make tags on a single product page unclickable:

    .single-product .tagged_as .detail-content a {
        pointer-events: none;
    }

    Kind Regards,
    8theme team

    Avatar: Enjin
    Enjin
    Participant
    November 24, 2023 at 14:11

    Simple and effective, thank you !

    For my first question, I had to override the woo.php file in the framework folder simply because our SEO team wanted to get rid of the h4 tags on the mini-cart (on each product title), since they come even before the h1 tag.
    How can we do that without altering this file ? Is there a snippet we could use on functions.php ?

    Thank you again

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 24, 2023 at 16:27

    Hello, Enjin,

    We’ve copied the etheme_cart_items function to the child theme to override the h4 tag in the mini cart. Please check.

    The code is from line 348 to 516 under the functions.php file – https://prnt.sc/KNCdNELssn9i

    Kind Regards,
    8theme team

    Avatar: Enjin
    Enjin
    Participant
    November 27, 2023 at 09:26

    Thank you Rose, it does the trick ! Perfect 🙂

    May I suggest removing the h4 from the template code for next update ? Unless there is a real point to the item title being h4, it would be better to simply use a div or span tag.

    Best regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 27, 2023 at 09:58

    Hello, Enjin,

    You’re welcome!

    Please post your request to our dev team directly – https://www.8theme.com/taskboard/

    Kind Regards,
    8theme team

  • Viewing 7 results - 1 through 7 (of 7 total)

The issue related to '‘Critical error on cart / checkout “etheme_woocommerce_before_add_to_cart_quantity_with_type”’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.