Critical cart error
-
Hello everyone,
I am posting this because we are having an issue in a website that we are not able to debug and find a solution. The issue is that every time that we add an item to the cart and try to access to the cart itself, we get a critical error from the website that we are not able to diagnose.
We already try to deactivate all plugins, reinstall woocommerce, cache cleaning and more troubleshooting but we are still unable to indetify where it is the error coming from.
We are desperate because we are unable to find a solution for the client.
The website is https://www.holidaytourstenerife.com and it only happens the first time that you try to access to the cart after adding the first item, then the issue disappears and everything goes smoothly.
Hope that you can help me to find where is the issue and be able to provide my client with the best possible solution.
Thank you for everything in advance!!!
The page I need help with: [log in to see the link]
-
Hi @giorgioomr,
Thank you for reaching out.
I understand you’re facing a critical error after adding a product and trying to access it for the first time.
As you’ve already tried different troubleshooting steps and the issue persists, I’d recommend you try switching your theme to a default theme if you’ve not done that already.
In some cases, even themes could lead to conflicts and cause such critical errors. In the meantime, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
- System Status Report, which you can find via WooCommerce > Status > Get system report > Copy for support.
- Fatal error logs (if any) under WooCommerce > Status > Logs.
You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.
Once we have more information, we’ll be able to assist you further.
I had the same problem, but only on one website, the other one still worked with the same WooCommerce version number. So I checked the fatal error log as suggested above and found out I had a incorrect call in functions.php of my child theme using the hook add_action( ‘woocommerce_before_cart’, ‘my_function’, 10 );
Thanks for the help @ckadenge, and good luck to @giorgioomr, I hope you will solve it too!
Hi. I have the same problem here. Fatal error when i go to cart page. How can i solve it?
- <details><summary>System Status Report</summary>
### WordPress Environment ###WordPress address (URL): [Redacted]Site address (URL): [Redacted]WC Version: 9.3.2Legacy REST API Package Version: El plugin Legacy REST API no está instalado en este sitio.Action Scheduler Version: ? 3.8.2Log Directory Writable: ?WP Version: 6.6.2WP Multisite: –WP Memory Limit: 1 GBWP Debug Mode: –WP Cron: ?Language: es_ESExternal object cache: –### Server Environment ###Server Info: ApachePHP Version: 8.2.23PHP Post Max Size: 128 MBPHP Time Limit: 30PHP Max Input Vars: 1000cURL Version: 7.74.0OpenSSL/1.1.1wSUHOSIN Installed: –MySQL Version: 10.6.15-MariaDB-1:10.6.15+maria~deb11-logMax Upload Size: 128 MBDefault Timezone is UTC: ?fsockopen/cURL: ?SoapClient: ?DOMDocument: ?GZip: ?Multibyte String: ?Remote Post: ?Remote Get: ?### Database ###[REDACTED]### Post Type Counts ###at_header_section: 1attachment: 932br_notice: 1custom_css: 1faq: 20nav_menu_item: 19page: 39post: 7product: 111product_variation: 480rank_math_schema: 1revision: 556rm_content_editor: 1saswp: 2saswp_reviews: 5saswp_rvs_location: 1saswp-collections: 1shop_coupon: 1shop_order: 26wp_navigation: 6wpcf7_contact_form: 2wpcode: 2ywcm_message: 1### Security ###Secure connection (HTTPS): ?Hide errors from visitors: ?### Active Plugins (23) ###WPML Multilingual CMS: por OnTheGoSystems – 4.6.13WPML SEO: por OnTheGoSystems – 2.1.0All-in-One WP Migration With Import: por ServMask – 6.77Data types for Adventure Tours theme: por Themedelight – 2.7.0Complianz Privacy Suite (GDPR/CCPA) premium: por Really Simple Plugins – 7.0.7Joinchat: por Creame – 5.1.7GA Google Analytics: por Jeff Starr – 20240820WPCode Lite: por WPCode – 2.2.1WPBakery Page Builder: por Michael M - WPBakery.com – 7.8Slider Revolution: por ThemePunch – 6.7.15Rank Math SEO PRO: por Rank Math – 3.0.29Rank Math SEO: por Rank Math – 1.0.228Payment Plugins for Stripe WooCommerce: por Payment [email protected] – 3.3.75WooCommerce Checkout Manager: por QuadLayers – 7.5.9WooCommerce Stripe Gateway: por WooCommerce – 8.7.0WooCommerce Multilingual & Multicurrency: por OnTheGoSystems – 5.3.7WooPayments: por WooCommerce – 8.2.1 (la actualización a la versión 8.2.2 está disponible)WooCommerce: por Automattic – 9.3.2 (la actualización a la versión 9.3.3 está disponible)WPML CMS Nav: por OnTheGoSystems – 1.5.5WPML Media Translation: por OnTheGoSystems – 2.7.4WPML Sticky Links: por OnTheGoSystems – 1.5.4WPML String Translation: por OnTheGoSystems – 3.2.14YITH WooCommerce Cart Messages Premium: por YITH – 1.8.1### Inactive Plugins (3) ###Contact Form 7: por Takayuki Miyoshi – 5.9.8Contact Form 7 Multilingual: por OnTheGoSystems – 1.3.1WooCommerce Direct Checkout: por QuadLayers – 3.3.9### Must Use Plugins (2) ###1&1 Product Subdomain: por 1&1 – 1.1.0akeeba-backup-coreupdate.php: por –### Settings ###Legacy API Enabled: –Force SSL: –Currency: EUR (€)Currency Position: right_spaceThousand Separator: .Decimal Separator: ,Number of Decimals: 2Taxonomies: Product Types: external (external)grouped (grouped)simple (simple)tour (tour)variable (variable)Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)exclude-from-search (exclude-from-search)featured (featured)outofstock (outofstock)rated-1 (rated-1)rated-2 (rated-2)rated-3 (rated-3)rated-4 (rated-4)rated-5 (rated-5)Connected to WooCommerce.com: –Enforce Approved Product Download Directories: ?HPOS feature enabled: –Order datastore: WC_Order_Data_Store_CPTHPOS data sync enabled: –### Logging ###Enabled: ?Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2Retention period: 30 díasLevel threshold: –Log directory size: 148 KB### WC Pages ###Base de la tienda: #866 - /tours-y-excursiones-tenerife/Carrito: #8 - /carrito/ - Contiene el shortcode [woocommerce_cart]Finalizar compra: #9 - /finalizar-compra/ - Contiene el shortcode [woocommerce_checkout]Mi cuenta: #10 - /mi-cuenta/Términos y condiciones: #1355 - /terminos-y-condiciones/### Theme ###Name: Adventure Tours ChildVersion: 1.0.0Author URL: Child Theme: ?Parent Theme Name: Adventure ToursParent Theme Version: 5.2.0Parent Theme Author URL: https://themeforest.net/user/themedelightWooCommerce Support: ?### Templates ###Overrides: adventure-tours/woocommerce/archive-product.phpadventure-tours/woocommerce/cart/cart-empty.phpadventure-tours/woocommerce/cart/cart-totals.phpadventure-tours/woocommerce/cart/cart.phpadventure-tours/woocommerce/cart/cross-sells.phpLa version 7.9.0 de adventure-tours/woocommerce/cart/mini-cart.php está obsoleta. La versión del núcleo es la 9.2.0adventure-tours/woocommerce/checkout/form-checkout.phpadventure-tours/woocommerce/checkout/order-received.phpadventure-tours/woocommerce/checkout/review-order.phpadventure-tours/woocommerce/checkout/thankyou.phpadventure-tours/woocommerce/content-product.phpadventure-tours/woocommerce/content-single-product.phpadventure-tours/woocommerce/content-widget-product.phpadventure-tours/woocommerce/global/sidebar.phpadventure-tours/woocommerce/global/wrapper-end.phpadventure-tours/woocommerce/global/wrapper-start.phpadventure-tours/woocommerce/loop/loop-end.phpadventure-tours/woocommerce/loop/loop-start.phpLa version 3.3.1 de adventure-tours/woocommerce/loop/pagination.php está obsoleta. La versión del núcleo es la 9.3.0La version 7.0.1 de adventure-tours/woocommerce/myaccount/form-login.php está obsoleta. La versión del núcleo es la 9.2.0adventure-tours/woocommerce/notices/error.phpadventure-tours/woocommerce/notices/notice.phpadventure-tours/woocommerce/notices/success.phpadventure-tours/woocommerce/order/order-details-customer.phpadventure-tours/woocommerce/order/order-details-item.phpadventure-tours/woocommerce/single-product/add-to-cart/variable.phpadventure-tours/woocommerce/single-product/meta.phpadventure-tours/woocommerce/single-product/price.phpadventure-tours/woocommerce/single-product/product-image.phpadventure-tours/woocommerce/single-product/product-thumbnails.phpadventure-tours/woocommerce/single-product/rating.phpadventure-tours/woocommerce/single-product/related.phpadventure-tours/woocommerce/single-product/review.phpadventure-tours/woocommerce/single-product/tabs/description.phpadventure-tours/woocommerce/single-product/tabs/tabs.phpadventure-tours/woocommerce/single-product/title.phpadventure-tours/woocommerce/single-product/up-sells.phpadventure-tours/woocommerce/single-product-reviews.phpadventure-tours/woocommerce/single-product.phpadventure-tours/woocommerce/content-product_cat.phpadventure-tours/woocommerce/taxonomy-product_cat.phpOutdated Templates: ? Aprende cómo actualizar | Vaciar la caché de información del tema de estado del sistema### WooPayments ###Version: 8.2.1Connected to WPCOM: SíWPCOM Blog ID: 230407655Account ID: ? No conectadoLogging: Desactivado### Admin ###Enabled Features: activity-panelsanalyticsproduct-block-editorcouponscore-profilercustomize-storecustomer-effort-score-tracksimport-products-taskexperimental-fashion-sample-productsshipping-smart-defaultsshipping-setting-tourhomescreenmarketingmobile-app-bannernavigationonboardingonboarding-taskspattern-toolkit-full-composabilityproduct-custom-fieldsremote-inbox-notificationsremote-free-extensionspayment-gateway-suggestionsprintfulshipping-label-bannersubscriptionsstore-alertstransient-noticeswoo-mobile-welcomewc-pay-promotionwc-pay-welcome-pagelaunch-your-storeDisabled Features: experimental-blocksminified-jsproduct-pre-publish-modalsettingsasync-product-editor-category-fieldproduct-editor-template-systemblueprintreactify-classic-payments-settingsDaily Cron: ? Next scheduled: 2024-10-01 22:45:45 +00:00Options: ?Notes: 146Onboarding: completed### Action Scheduler ###Complete: 195Oldest: 2024-09-01 01:15:37 +0000Newest: 2024-10-01 14:59:20 +0000Failed: 89Oldest: 2023-03-04 17:58:50 +0000Newest: 2024-09-05 11:30:36 +0000Pending: 4Oldest: 2024-10-02 10:27:58 +0000Newest: 2024-10-03 13:52:59 +0000### Status report information ###Generated at: 2024-10-01 20:35:48 +00:00
</details> - 2024-10-01T13:47:16+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T13:49:13+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T13:51:43+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T13:52:52+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T13:54:51+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T14:32:59+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T14:58:25+00:00 CRITICAL Uncaught Error: Call to undefined method WooCommerce::show_messages in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php:164 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php”,”line”:164},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours-child/functions.php(63): WooCommerce->__call()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): apply_matched_coupons()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(517): WP_Hook->do_action()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/woocommerce/cart/cart.php(20): do_action()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/homepages/11/d…’)”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(101): wc_get_template()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(434): WC_Shortcodes::cart()”,”#10 [internal function]: do_shortcode_tag()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/shortcodes.php(273): preg_replace_callback()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): do_shortcode()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,”#14 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/post-template.php(256): apply_filters()”,”#15 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/themes/adventure-tours/page.php(22): the_content()”,”#16 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/template-loader.php(106): include(‘/homepages/11/d…’)”,”#17 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(19): require_once(‘/homepages/11/d…’)”,”#18 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#19 {main}”,”thrown”]} 2024-10-01T15:17:35+00:00 CRITICAL Uncaught Error: Class “Automattic\WooCommerce\Admin\Notes\WC_Site_Tracking” not found in /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Admin/Notes/Notes.php:426 CONTEXT: {“error”:{“type”:1,”file”:”/homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Admin/Notes/Notes.php”,”line”:426},”backtrace”:[“”,”#0 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Admin/Notes/Notes.php(389): Automattic\WooCommerce\Admin\Notes\Notes::record_tracks_event_without_cookies()”,”#1 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-content/plugins/woocommerce/src/Admin/API/NoteActions.php(82): Automattic\WooCommerce\Admin\Notes\Notes::trigger_note_action()”,”#2 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/rest-api/class-wp-rest-server.php(1230): Automattic\WooCommerce\Admin\API\NoteActions->trigger_note_action()”,”#3 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request()”,”#4 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()”,”#5 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/rest-api.php(420): WP_REST_Server->serve_request()”,”#6 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(324): rest_api_loaded()”,”#7 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,”#8 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/plugin.php(565): WP_Hook->do_action()”,”#9 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp.php(418): do_action_ref_array()”,”#10 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/class-wp.php(813): WP->parse_request()”,”#11 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-includes/functions.php(1336): WP->main()”,”#12 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/wp-blog-header.php(16): wp()”,”#13 /homepages/11/d942150872/htdocs/clickandbuilds/HolidayToursTenerife/index.php(17): require(‘/homepages/11/d…’)”,”#14 {main}”,”thrown”]}
@ldwd yeah it is very frustrating because I am not able to find how to solve it and I am having a lot of problems with the customer because of it, hopefully I can find a solution to it. Thank you for you good words mate!!
@ckadenge already posted you the information you requested to me, thank you so much for the support!! ????
Hi @giorgioomr,
Thank you for sharing further details on this.
I was able to check your system status report and could notice that your theme is overriding the cart pages.
Did you already have a chance to switch to a default theme (Storefront or Twenty Twenty-Four) to see if the issue persists with a default theme? Also, please update your WooCommerce version to the latest version and test again.
As for @fredbra, please create a new topic so that we can be able to address your issue separately.
Hello @ckadenge,
From what i can see, we created a cart page when we found the issue and i think it’s correctly created.
I tested with the default template (Twenty Seven) and it seems that it’s is working.
Could be possible that the issue is similar to the one that @ldwd had and i am having an incorrect call to the functions php file?
Thank you for everything in advance!
Here I uploaded the screenshot of the cart page
Hello guys,
I already found the issue that was giving us the critical error.
I have this code to apply a 10% discount in the cart when the users are buying our products.
//Cupón descuento automático
add_action( ‘woocommerce_before_cart’, ‘apply_matched_coupons’ );
function apply_matched_coupons() {
global $woocommerce;
$coupon_code = ‘-10%’; // aquí tu código de cupón
if ( $woocommerce->cart->has_discount( $coupon_code ) ) return;
if ( $woocommerce->cart->cart_contents_total >= 1 ) {
$woocommerce->cart->add_discount( $coupon_code );
$woocommerce->show_messages();
}
}Is there any other way to apply that 10% discount to the products without the code?
Thank you everyone!!!!!
Hi @giorgioomr,
I already found the issue that was giving us the critical error.
I’m glad you were able to find the issue from your end.
Is there any other way to apply that 10% discount to the products without the code?
Yes, you can apply a discount without using a custom code. You can use the built-in WooCommerce feature to create a coupon. Here are the steps to follow:
- Navigate to WooCommerce > Coupons in your WordPress dashboard.
- Click ‘Add Coupon’ and provide a unique code in the ‘Coupon code’ field.
- In the ‘Discount type’ dropdown, select ‘Percentage discount’.
- Enter ’10’ in the ‘Coupon amount’ field.
- Optionally, you can set other parameters like usage limit, expiry date, etc.
- Click ‘Publish’.
Now, whenever a customer enters this coupon code at the checkout, a 10% discount will be applied to their cart.
Please note that this method requires the customer to manually enter the coupon code. If you want to automatically apply the discount, you might need a plugin like Smart Coupons.
I hope this helps.
- You must be logged in to reply to this topic.