Address end point critical error
-
The endpoint page /my-account/edit-address/ in showing a “There has been a critical error on this website.” message at the end of the page. The page format is not loading well and it’s not showing shipping addresses, even when there is a shipping address shown in the default addresses.
This happens only for users that have placed an order.
-
Hello,
To know more of what is causing it for you site you would need to get the error log that is produced by WordPress when that error message is generated. It might have emailed a copy of it to the default site email or you would need to check your WordPress debug or error logs.
Getting the logs would help determine what plugin or theme is triggering the error and what might be causing a conflict with the plugin.
Thanks for your answer. The message show in debug is:
PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given
in /woocommerce/includes/class-wc-countries.php:634And it only occurs in users that have placed an order with the plugin active.
This is the entire stack trace:
PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /var/www/wp-content/plugins/woocommerce/includes/class-wc-countries.php:634
Stack trace:
#0 [internal function]: trim(Array)
#1 /var/www/wp-content/plugins/woocommerce/includes/class-wc-countries.php(634): array_map('trim', Array)
#2 /var/www/wp-content/plugins/woo-address-book/templates/myaccount/my-address-book.php(224): WC_Countries->get_formatted_address(Array)
#3 /var/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include('/var/www/wp-con...')
#4 /var/www/wp-content/plugins/woo-address-book/includes/class-wc-address-book.php(306): wc_get_template('myaccount/my-ad...', Array, '', '/var/www/wp-con...')
#5 /var/www/wp-includes/class-wp-hook.php(324): WC_Address_Book->address_page('')
#6 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#7 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 /var/www/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3455): do_action('woocommerce_acc...', '')
#9 /var/www/wp-includes/class-wp-hook.php(324): woocommerce_account_content('')
#10 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#11 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#12 /var/www/wp-content/plugins/woocommerce/templates/myaccount/my-account.php(34): do_action('woocommerce_acc...')
#13 /var/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include('/var/www/wp-con...')
#14 /var/www/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(121): wc_get_template('myaccount/my-ac...', Array)
#15 /var/www/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(57): WC_Shortcode_My_Account::my_account(Array)
#16 /var/www/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(75): WC_Shortcode_My_Account::output(Array)
#17 /var/www/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(118): WC_Shortcodes::shortcode_wrapper(Array, Array)
#18 /var/www/wp-includes/shortcodes.php(434): WC_Shortcodes::my_account(Array, '', 'woocommerce_my_...')
#19 [internal function]: do_shortcode_tag(Array)
#20 /var/www/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(woocom...', 'do_shortcode_ta...', '<div class="kb-...')
#21 /var/www/wp-includes/class-wp-hook.php(324): do_shortcode('<div class="kb-...')
#22 /var/www/wp-includes/plugin.php(205): WP_Hook->apply_filters('<div class="kb-...', Array)
#23 /var/www/wp-includes/post-template.php(256): apply_filters('the_content', '<!-- wp:kadence...')
#24 /var/www/wp-content/themes/storefront/inc/storefront-template-functions.php(352): the_content()
#25 /var/www/wp-includes/class-wp-hook.php(324): storefront_page_content('')
#26 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#27 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#28 /var/www/wp-content/themes/storefront/content-page.php(18): do_action('storefront_page')
#29 /var/www/wp-includes/template.php(812): require('/var/www/wp-con...')
#30 /var/www/wp-includes/template.php(745): load_template('/var/www/wp-con...', false, Array)
#31 /var/www/wp-includes/general-template.php(206): locate_template(Array, true, false, Array)
#32 /var/www/wp-content/themes/storefront/template-fullwidth.php(21): get_template_part('content', 'page')
#33 /var/www/wp-includes/template-loader.php(106): include('/var/www/wp-con...')
#34 /var/www/wp-blog-header.php(19): require_once('/var/www/wp-inc...')
#35 /var/www/index.php(17): require('/var/www/wp-blo...')
#36 {main}
thrown in /var/www/wp-content/plugins/woocommerce/includes/class-wc-countries.php on line 634Thank you for that. Which version of the plugin are you using? From the look of the stack trace there you might be using one of the old 3.x betas of the plugin.
The latest 3.x beta can be obtained from our site: https://www.crosspeaksoftware.com/downloads/woocommerce-address-book/
Or the latest 2.x release can be obtained here on ww.wp.xz.cn
The topic ‘Address end point critical error’ is closed to new replies.