Critical error on refund
-
When processing a refund, the site generates a fatal error, and the order edit page gets broken. https://screenrec.com/share/Lhr2ICtAHm https://prnt.sc/mrBgXxA1DPA0
on error log we have this error
2025-05-08T20:48:15+00:00 Critical Uncaught Error: Call to a member function get_items() on int in /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php:2220
Additional context
{
"error": {
"type": 1,
"file": "/home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php",
"line": 2220
},
"remote-logging": true,
"backtrace": [
"",
"#0 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/templates/myaccount/orders.php(39): WC_Order->get_item_count_refunded()",
"#1 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include('/home/1235416.c...')",
"#2 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3544): wc_get_template()",
"#3 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(324): woocommerce_account_orders()",
"#4 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
"#5 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()",
"#6 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3492): do_action()",
"#7 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(324): woocommerce_account_content()",
"#8 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
"#9 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()",
"#10 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/templates/myaccount/my-account.php(34): do_action()",
"#11 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include('/home/1235416.c...')",
"#12 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(125): wc_get_template()",
"#13 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(57): WC_Shortcode_My_Account::my_account()",
"#14 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(75): WC_Shortcode_My_Account::output()",
"#15 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(118): WC_Shortcodes::shortcode_wrapper()",
"#16 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/shortcodes.php(434): WC_Shortcodes::my_account()",
"#17 [internal function]: do_shortcode_tag()",
"#18 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()",
"#19 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(324): do_shortcode()",
"#20 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()",
"#21 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/post-template.php(256): apply_filters()",
"#22 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/themes/storefront/inc/storefront-template-functions.php(352): the_content()",
"#23 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(324): storefront_page_content()",
"#24 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
"#25 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()",
"#26 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/themes/storefront/content-page.php(18): do_action()",
"#27 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/template.php(812): require('/home/1235416.c...')",
"#28 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/template.php(745): load_template()",
"#29 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/general-template.php(206): locate_template()",
"#30 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-content/themes/storefront/page.php(24): get_template_part()",
"#31 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-includes/template-loader.php(106): include('/home/1235416.c...')",
"#32 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/wp-blog-header.php(19): require_once('/home/1235416.c...')",
"#33 /home/1235416.cloudwaysapps.com/aakagqrwwg/public_html/index.php(17): require('/home/1235416.c...')",
"#34 {main}",
"thrown"
]
}
The page I need help with: https://www.durkintactical.com/
regarding this error i created a support ticket on authorize.net then they also said that this error is from WooCommerce Shipping & Tax plugin. refer:https://ww.wp.xz.cn/support/topic/critical-error-on-refund/#new-topic-0
so please check this. i can see this error happening daily from last one week.
please CC [email protected]
The page I need help with: [log in to see the link]
The topic ‘Critical error on refund’ is closed to new replies.