简体   繁体   中英

Woocommerce - internal server error: Notice: id was called incorrectly

My site has a problem. On checkout I get the Internal server error. I have read almost all the solutions provided on forums and even on this forum but none proved to solve this problem. Here is the error log below.

Notice: id was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/astra/page.php'), astra_content_page_loop, do_action('astra_content_page_loop'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, Astra_Loop->loop_markup_page, Astra_Loop->loop_markup, do_action('astra_page_template_parts_content'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, Astra_Loop->template_parts_page, get_template_part, locate_template, load_template, require('/themes/astra/template-parts/content-page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, call_user_func, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include('/plugins/woocommerce/templates/ch in /home/newsvlup/public_html/wp-includes/functions.php on line 4161

It's because of Woocommerce deprecated some methods in the new version, but your existing code in plugins or theme are using the old methods to get the cart data that's why you are receiving this notice.

Best way to ignore this type of notices is to check all the plugins and theme with the new version of the WooCommerce before making live.

I hope this finds you well with your concern.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM