Uncaught Error: Call to a member function is_empty()
-
Hi,
I have been receiving this error. I will appreciate your help.Error Details
=============
An error of type E_ERROR was caused in line 24 of the file /home/copperre/public_html/wp-content/plugins/woocommerce/templates/cart/mini-cart.php. Error message: Uncaught Error: Call to a member function is_empty() on null in /home/copperre/public_html/wp-content/plugins/woocommerce/templates/cart/mini-cart.php:24
Stack trace:
#0 /home/copperre/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(344): include()
#1 /home/copperre/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(2164): wc_get_template(‘cart/mini-cart….’, Array)
#2 /home/copperre/public_html/wp-content/themes/flatsome-child/template-parts/header/partials/element-cart.php(80): woocommerce_mini_cart()
#3 /home/copperre/public_html/wp-includes/template.php(732): require(‘/home/copperre/…’)
#4 /home/copperre/public_html/wp-includes/template.php(676): load_template(‘/home/copperre/…’, false, Array)
#5 /home/copperre/public_html/wp-includes/general-template.php(204): locate_template(Array, true, false, Array)
#6 /home/copperre/public_html/wp-content/themes/flatsome/inc/structure/structure-header.php(97): get_template_part(‘template-parts/…’, ”)
-
Same here. I think it’s due to the recent (automatic in my case) update to Woocommerce 4.7
I tried to temporarily install the previous 4.6.2 version but it just cant, since always the 4.7 is being installed. So i can’t test test this out.
Hope for fast resolve.
Wupdate: i managed to temporarily fix it, just by reinstalling the 4.6.2 woo version.
(my caching plugin was on, that’s why it seemt to me that woo 4.7 is being installed instead of 4.6.2..)I disabled my automatic updates on Woocommerce, until we got more info on this issue here.
- This reply was modified 4 years ago by iwanwilaga.
- This reply was modified 4 years ago by iwanwilaga.
- This reply was modified 4 years ago by iwanwilaga.
Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status.
Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.can i send mine privately?
Hello @iwanwilaga,
We haven’t update that template or the cart in 4.7, could you provide steps to reproduce this issue?
In the link reported here seems like something related to flatsome, maybe they are calling something too early, and that’s why could findwc()->cart
.Thanks, @claudiosanches right, i didn’t notice that both @copperrefections and i are on Flatsome theme. So 99% it’s Flatsome issue. I will try to reach out to them. OR can you please also discuss it their dev team officially? I bet this might affect still a good bunch of people.
WiktorHi @wpmuguru and @claudiosanches ,
Thank you for your responses
Here is the status report,### WordPress Environment ### WordPress address (URL): https://www.copperreflections.com Site address (URL): https://www.copperreflections.com WC Version: 4.7.0 REST API Version: ? 4.7.0 WC Blocks Version: ? 3.6.0 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? Inactive 1.6.3 Log Directory Writable: ? WP Version: 5.5.3 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: – Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.12 PHP Post Max Size: 16 MB PHP Time Limit: 0 PHP Max Input Vars: 1000 cURL Version: 7.71.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.7.32-log Max Upload Size: 16 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.7.0 WC Database Prefix: wp_ Total Database Size: 111.42MB Database Data Size: 89.37MB Database Index Size: 22.05MB wp_woocommerce_sessions: Data: 0.36MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_items: Data: 0.57MB + Index: 0.24MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 3.61MB + Index: 2.29MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_comments: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 9.30MB + Index: 0.37MB + Engine MyISAM wp_postmeta: Data: 52.38MB + Index: 11.74MB + Engine MyISAM wp_posts: Data: 7.07MB + Index: 1.07MB + Engine MyISAM wp_termmeta: Data: 0.45MB + Index: 0.29MB + Engine MyISAM wp_terms: Data: 0.80MB + Index: 0.98MB + Engine MyISAM wp_term_relationships: Data: 0.63MB + Index: 1.12MB + Engine MyISAM wp_term_taxonomy: Data: 0.72MB + Index: 0.50MB + Engine MyISAM wp_usermeta: Data: 0.75MB + Index: 0.46MB + Engine MyISAM wp_users: Data: 0.05MB + Index: 0.05MB + Engine MyISAM wp_wc_admin_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_stats: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.30MB + Index: 0.30MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wsmea_conditional_payment_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yoast_indexable: Data: 11.62MB + Index: 1.71MB + Engine MyISAM wp_yoast_indexable_hierarchy: Data: 0.20MB + Index: 0.47MB + Engine MyISAM wp_yoast_migrations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_yoast_primary_term: Data: 0.04MB + Index: 0.04MB + Engine MyISAM wp_yoast_prominent_words: Data: 0.14MB + Index: 0.20MB + Engine MyISAM wp_yoast_seo_links: Data: 0.26MB + Index: 0.06MB + Engine MyISAM wp_yoast_seo_meta: Data: 0.12MB + Index: 0.12MB + Engine MyISAM ### Post Type Counts ### aiosrs-schema: 3 attachment: 5357 blocks: 4 cms_block: 19 customize_changeset: 2 custom_css: 2 dflip: 5 mc4wp-form: 1 nav_menu_item: 85 oembed_cache: 7 page: 59 post: 163 postman_sent_mail: 129 product: 4876 review: 1 schema: 3 shop_order: 447 woodmart_sidebar: 2 wpcf7_contact_form: 2 wppb-ul-cpt: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (24) ### WooCommerce Wholesale Pricing: by Danyo Borg – 2.2.2 – Installed version not tested with active version of WooCommerce 4.7.0 Blackhole for Bad Bots: by Jeff Starr – 2.9.1 Classic Editor: by WordPress Contributors – 1.6 CMB2: by CMB2 team – 2.7.0 Contact Form 7: by Takayuki Miyoshi – 5.3 Disable WooCommerce Bloat: by ospiotr – 2.3 – Installed version not tested with active version of WooCommerce 4.7.0 Specific checkout for wholesale customers: by Curran Van Waarde – Webcraftic Hide login page: by Webcraftic – 1.1.1 jQuery Manager for WordPress: by Remzi Cavdar – 1.10.6 WPBakery Page Builder: by Michael M - WPBakery.com – 6.4.1 Profile Builder - Custom CSS Classes on fields: by cozmoslabs Madalin Ungureanu – 1.0.4 Profile Builder - Customization Toolbox Add-On: by Cozmoslabs Georgian Cocora – 1.1.0 Profile Builder - Labels Edit Add-On: by Cozmoslabs Cristophor Hurduban – 1.0.9 Profile Builder - WooCommerce Sync Add-on: by Cozmoslabs Adrian Spiac – 1.5.7 – Installed version not tested with active version of WooCommerce 4.7.0 Profile Builder Hobbyist: by Cozmoslabs – 3.3.1 PWA for WP: by Magazine3 – 1.7.25 Really Simple CAPTCHA: by Takayuki Miyoshi – 2.0.2 WooCommerce Stripe Gateway: by WooCommerce – 4.5.3 – Installed version not tested with active version of WooCommerce 4.7.0 WooCommerce: by Automattic – 4.7.0 Yoast SEO Premium: by Team Yoast – 15.2.1 – Installed version not tested with active version of WooCommerce 4.7.0 WP AMP: by Custom4Web – 9.3.11 – Installed version not tested with active version of WooCommerce 4.7.0 WP Fastest Cache Premium: by Emre Vona – 1.5.9 WP Fastest Cache: by Emre Vona – 0.9.1.2 Yoast SEO: WooCommerce: by Team Yoast – 13.7 – Installed version not tested with active version of WooCommerce 4.7.0 ### Inactive Plugins (0) ### ### Must Use Plugins (1) ### Blackhole Cache Helper: by Jeff Starr – 1.0 ### Settings ### API Enabled: ? Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) 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: – ### WC Pages ### Shop base: #7 - /shop/ Cart: #8 - /cart/ Checkout: #9 - /checkout/ My account: ? Page does not contain the shortcode. Terms and conditions: #11505 - /privacy-policy/ ### Theme ### Name: Version: (update to version 0 is available) Author URL: Child Theme: ? Parent Theme Name: Parent Theme Version: – 0 is available Parent Theme Author URL: WooCommerce Support: ? ### Templates ### Overrides: flatsome/woocommerce/archive-product.php flatsome/woocommerce/cart/cart-empty.php flatsome/woocommerce/cart/cart-shipping.php flatsome/woocommerce/cart/cart.php flatsome/woocommerce/checkout/form-checkout.php flatsome/woocommerce/checkout/form-coupon.php flatsome/woocommerce/checkout/terms.php flatsome/woocommerce/checkout/thankyou.php flatsome/woocommerce/content-product.php flatsome/woocommerce/content-single-product.php flatsome/woocommerce/content-widget-product.php flatsome/woocommerce/global/breadcrumb.php flatsome/woocommerce/global/quantity-input.php flatsome/woocommerce/global/wrapper-end.php flatsome/woocommerce/global/wrapper-start.php flatsome/woocommerce/loop/loop-end.php flatsome/woocommerce/loop/loop-start.php flatsome/woocommerce/loop/pagination.php flatsome/woocommerce/loop/result-count.php flatsome/woocommerce/loop/sale-flash.php /home/copperre/public_html/wp-content/plugins/pb-add-on-woocommerce/templates/myaccount-edit-profile.php flatsome/woocommerce/myaccount/form-login.php flatsome/woocommerce/myaccount/navigation.php flatsome/woocommerce/notices/error.php flatsome/woocommerce/notices/notice.php flatsome/woocommerce/notices/success.php flatsome/woocommerce/product-searchform.php flatsome/woocommerce/single-product/photoswipe.php flatsome/woocommerce/single-product/price.php flatsome/woocommerce/single-product/product-image.php flatsome/woocommerce/single-product/product-thumbnails.php flatsome/woocommerce/single-product/rating.php flatsome/woocommerce/single-product/related.php flatsome/woocommerce/single-product/review.php flatsome/woocommerce/single-product/sale-flash.php flatsome/woocommerce/single-product/share.php flatsome/woocommerce/single-product/short-description.php flatsome/woocommerce/single-product/tabs/tabs.php flatsome/woocommerce/single-product/title.php flatsome/woocommerce/single-product/up-sells.php flatsome/woocommerce/single-product-reviews.php flatsome/woocommerce/single-product.php ### Action Scheduler ###
Hi @iwanwilaga ,
You’re right, I do use flatsome theme. If you learn anything from flatsome support would you please let me know?Thank you
I might like to change my theme. Which is the best WordPress WooCommerce theme for speed and SEO wise?
Thank you.Hi there. Sorry that we missed your last response. We don’t have any direct connection with Flatsome, so please reach out to them directly about this issue.
First, it would be a good to check if the issue is with Flatsome. You can use a plugin such as Health Check to test a default theme like Twenty Twenty to see if the issue occurs then. If it does not, then please get in touch with Flatsome support.
- The topic ‘Uncaught Error: Call to a member function is_empty()’ is closed to new replies.