Title: Fatal error: Uncaught Error: Cannot unset string offsets
Last modified: January 11, 2024

---

# Fatal error: Uncaught Error: Cannot unset string offsets

 *  Resolved [khadimyaseen](https://wordpress.org/support/users/khadimyaseen/)
 * (@khadimyaseen)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/)
 * hello Support Team, 
   Please review this error I got from the plugin.I am not 
   sure how to fix it!**Fatal error**: Uncaught Error: Cannot unset string offsets
   in /home/u108686528/domains/linkpanda.co/public_html/wp-content/plugins/flexible-
   checkout-fields/classes/plugin.php:247 Stack trace: #0 /home/u108686528/domains/
   linkpanda.co/public_html/wp-includes/class-wp-hook.php(324): Flexible_Checkout_Fields_Plugin-
   >woocommerce_get_country_locale_base() #1 /home/u108686528/domains/linkpanda.
   co/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #2 /home/
   u108686528/domains/linkpanda.co/public_html/wp-content/plugins/woocommerce/includes/
   class-wc-countries.php(1651): apply_filters() #3 /home/u108686528/domains/linkpanda.
   co/public_html/wp-content/plugins/woocommerce/includes/class-wc-countries.php(
   1671): WC_Countries->get_country_locale() #4 /home/u108686528/domains/linkpanda.
   co/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-
   my-account.php(195): WC_Countries->get_address_fields() #5 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/woocommerce/includes/wc-template-
   functions.php(3329): WC_Shortcode_My_Account::edit_address() #6 /home/u108686528/
   domains/linkpanda.co/public_html/wp-includes/class-wp-hook.php(324): woocommerce_account_edit_address()#
   7 /home/u108686528/domains/linkpanda.co/public_html/wp-includes/class-wp-hook.
   php(348): WP_Hook->apply_filters() #8 /home/u108686528/domains/linkpanda.co/public_html/
   wp-includes/plugin.php(517): WP_Hook->do_action() #9 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/woocommerce/includes/wc-template-
   functions.php(3239): do_action() #10 /home/u108686528/domains/linkpanda.co/public_html/
   wp-includes/class-wp-hook.php(324): woocommerce_account_content() #11 /home/u108686528/
   domains/linkpanda.co/public_html/wp-includes/class-wp-hook.php(348): WP_Hook-
   >apply_filters() #12 /home/u108686528/domains/linkpanda.co/public_html/wp-includes/
   plugin.php(517): WP_Hook->do_action() #13 /home/u108686528/domains/linkpanda.
   co/public_html/wp-content/plugins/woocommerce/templates/myaccount/my-account.
   php(34): do_action() #14 /home/u108686528/domains/linkpanda.co/public_html/wp-
   content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/
   u10868652…’) #15 /home/u108686528/domains/linkpanda.co/public_html/wp-content/
   plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(123):
   wc_get_template() #16 /home/u108686528/domains/linkpanda.co/public_html/wp-content/
   plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(72):
   WC_Shortcode_My_Account::my_account() #17 /home/u108686528/domains/linkpanda.
   co/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(
   72): WC_Shortcode_My_Account::output() #18 /home/u108686528/domains/linkpanda.
   co/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(
   115): WC_Shortcodes::shortcode_wrapper() #19 /home/u108686528/domains/linkpanda.
   co/public_html/wp-includes/shortcodes.php(433): WC_Shortcodes::my_account() #
   20 [internal function]: do_shortcode_tag() #21 /home/u108686528/domains/linkpanda.
   co/public_html/wp-includes/shortcodes.php(273): preg_replace_callback() #22 /
   home/u108686528/domains/linkpanda.co/public_html/wp-content/plugins/elementor/
   includes/base/widget-base.php(431): do_shortcode() #23 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/includes/widgets/text-editor.
   php(417): Elementor\Widget_Base->parse_text_editor() #24 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/includes/base/controls-
   stack.php(2297): Elementor\Widget_Text_Editor->render() #25 /home/u108686528/
   domains/linkpanda.co/public_html/wp-content/plugins/elementor/includes/base/widget-
   base.php(614): Elementor\Controls_Stack->render_by_mode() #26 /home/u108686528/
   domains/linkpanda.co/public_html/wp-content/plugins/elementor/includes/base/widget-
   base.php(755): Elementor\Widget_Base->render_content() #27 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/includes/base/element-base.
   php(464): Elementor\Widget_Base->print_content() #28 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/includes/base/element-base.
   php(1375): Elementor\Element_Base->print_element() #29 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/includes/base/element-base.
   php(464): Elementor\Element_Base->print_content() #30 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/core/base/document.php(
   1749): Elementor\Element_Base->print_element() #31 /home/u108686528/domains/linkpanda.
   co/public_html/wp-content/plugins/elementor/core/base/document.php(1144): Elementor\
   Core\Base\Document->print_elements() #32 /home/u108686528/domains/linkpanda.co/
   public_html/wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\
   Core\Base\Document->print_elements_with_wrapper() #33 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/includes/frontend.php(1074):
   Elementor\Frontend->get_builder_content() #34 /home/u108686528/domains/linkpanda.
   co/public_html/wp-includes/class-wp-hook.php(324): Elementor\Frontend->apply_builder_in_content()#
   35 /home/u108686528/domains/linkpanda.co/public_html/wp-includes/plugin.php(205):
   WP_Hook->apply_filters() #36 /home/u108686528/domains/linkpanda.co/public_html/
   wp-includes/post-template.php(256): apply_filters() #37 /home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/elementor/modules/page-templates/
   module.php(190): the_content() #38 [internal function]: Elementor\Modules\PageTemplates\
   Module->print_callback() #39 /home/u108686528/domains/linkpanda.co/public_html/
   wp-content/plugins/elementor/modules/page-templates/module.php(207): call_user_func()#
   40 /home/u108686528/domains/linkpanda.co/public_html/wp-content/plugins/elementor/
   modules/page-templates/templates/header-footer.php(19): Elementor\Modules\PageTemplates\
   Module->print_content() #41 /home/u108686528/domains/linkpanda.co/public_html/
   wp-includes/template-loader.php(106): include(‘/home/u10868652…’) #42 /home/u108686528/
   domains/linkpanda.co/public_html/wp-blog-header.php(19): require_once(‘/home/
   u10868652…’) #43 /home/u108686528/domains/linkpanda.co/public_html/index.php(
   17): require(‘/home/u10868652…’) #44 {main} thrown in **/home/u108686528/domains/
   linkpanda.co/public_html/wp-content/plugins/flexible-checkout-fields/classes/
   plugin.php** on line **247**
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-uncaught-error-cannot-unset-string-offsets-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Support [dominikl65](https://wordpress.org/support/users/dominikl65/)
 * (@dominikl65)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17334887)
 * Hi [@khadimyaseen](https://wordpress.org/support/users/khadimyaseen/),
 * May I ask what version of WooCommerce you are using? If version 8.5 then currently,
   WooCommerce in the latest version causes errors on different themes and with 
   different plugins. I encourage you to downgrade to version 8.4 as this version
   resolves these issues.
 * There are plenty of reports on the WooCommerce support forum regarding this topic:
   [https://wordpress.org/support/plugin/woocommerce/](https://wordpress.org/support/plugin/woocommerce/)
 *  [dantg](https://wordpress.org/support/users/dantg/)
 * (@dantg)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17334897)
 * I’ve spotted the same. Rather you should fix this plugin to meet new woocommerce
   version than making a solution to downgrade woocommerce. Is there woocommerce
   an addon to this plugin or am I missing something?
 *  [damianmachnik](https://wordpress.org/support/users/damianmachnik/)
 * (@damianmachnik)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17334957)
 * Hi [@dantg](https://wordpress.org/support/users/dantg/)
 * Thank you for your feedback. I’m sure you know that you did not miss anything.
   Our developers are aware of this issue. However, this particular case is a bit
   different than usual bug, which we can fix right away.
 * Mentioned error was caused by the newest WooCommerce version. WooCommerce 8.5
   caused plenty of issues (not only with FCF, but some other plugin and motives).
   Most likely, because of these issues WooCommerce authors downgraded it to version
   8.4. This is why, rolling-back (as it is an official solution) is the best and
   quickest way to solve your issue.
 * Once 8.5 is available we will update FCF as soon as possible to make it fully
   compatible.
 * Have a wonderful day 🙂
 *  Thread Starter [khadimyaseen](https://wordpress.org/support/users/khadimyaseen/)
 * (@khadimyaseen)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17335052)
 * Thanks [@dominikl65](https://wordpress.org/support/users/dominikl65/) for the
   quick response.
   Yes I am using 8.5 version of WooCommerce and I think I will 
   stick with it for now because downgrading may make things even worse for me. 
   As [@damianmachnik](https://wordpress.org/support/users/damianmachnik/) mentioned,
   until the woocommerce fix there new version, I have found a quick fix to this
   particular error.Here’s what I did:On /wp-content/plugins/flexible-checkout-fields/
   classes/plugin.php:247,I added a check with `is_array` before attempting to unset
   the keys, which prevented the error.
 *     ```wp-block-code
       if (is_array($field)) {
                   unset( $base[ $key ]['placeholder'] );
                   unset( $base[ $key ]['label'] );
                   if ( version_compare( WC()->version, '4.4.1', '>=' ) ) {
                       unset( $base[ $key ]['class'] );
                   }
               }
       ```
   
 *  [eddoyle](https://wordpress.org/support/users/eddoyle/)
 * (@eddoyle)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17336818)
 * Thanks for the patch [@khadimyaseen](https://wordpress.org/support/users/khadimyaseen/)
 *  [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17337095)
 * > Rather you should fix this plugin to meet new woocommerce version than making
   > a solution to downgrade woocommerce
 * [@dantg](https://wordpress.org/support/users/dantg/) You should probably downgrade
   WooCommerce anyway. v8.5.0 was withdrawn shortly after its release, bringing 
   the latest official version back down to v8.4.0. That’s the best version to run
   until v8.5.1 is eventually released.
 *  [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17345397)
 * [@dominikl65](https://wordpress.org/support/users/dominikl65/) I have updated
   to WooCommerce 8.5.1, released today, and am still receiving the fatal error 
   when Flexible Checkout Fields v3.5.19 is active.
 *  [nourier](https://wordpress.org/support/users/nourier/)
 * (@nourier)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17346336)
 * Hi everyone
 * Same Problem, checkout page after update has not been open due to critical error.
 * WooCommerce version:8.5.1 and WordPress version:6.4.2
 * Error: Cannot unset string offsets in /var/www/vhosts/mypage.com/httpdocs/wp-
   content/plugins/flexible-checkout-fields/classes/plugin.php:247\nStack trace:\
   n#0 /var/www/vhosts/mypage.com/httpdocs/wp-includes/class-wp-hook.php(324): Flexible_Checkout_Fields_Plugin-
   >woocommerce_get_country_locale_base()\n#1 /var/www/vhosts/mypage.com.de/httpdocs/
   wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#2 /var/www/vhosts/mypage.
   com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-countries.php(1651):
   apply_filters()\n#3 /var/www/vhosts/mypage.com/httpdocs/wp-content/plugins/woocommerce/
   includes/class-wc-frontend-scripts.php(549): WC_Countries->get_country_locale()\
   n#4 /var/www/vhosts/mypage.com/httpdocs/wp-content/plugins/woocommerce/includes/
   class-wc-frontend-scripts.php(465): WC_Frontend_Scripts::get_script_data()\n#
   5 /var/www/vhosts/mypage.com/httpdocs/wp-content/plugins/woocommerce/includes/
   class-wc-frontend-scripts.php(632): WC_Frontend_Scripts::localize…’, referer:
   [https://mypage.com/product/bb/](https://mypage.com/product/bb/)
   Got error ‘PHP
   message: PHP Fatal error: Uncaught
 *  Plugin Support [dominikl65](https://wordpress.org/support/users/dominikl65/)
 * (@dominikl65)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17346645)
 * Hi,
 * We are working on this problem. We won’t wait for a fix from WooCommerce. Furthermore,
   we will simply release a fix as soon as possible that works with the latest version
   of WooCommerce. Until then, I encourage you to downgrade WooCommerce to version
   8.4.0.
 * I’ll keep you posted on the update.
 *  Plugin Support [dominikl65](https://wordpress.org/support/users/dominikl65/)
 * (@dominikl65)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17347696)
 * Hi,
 * We have just released the Flexible Checkout Fields 3.6.0 update, containing the
   proper fixes for the problem you’ve reported. It’s compatible with the latest
   WooCommerce version. So please simply do the update.
 *  [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17348534)
 * wfm! Thanks!
 *  [josemgala](https://wordpress.org/support/users/josemgala/)
 * (@josemgala)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17361807)
 * Hi! but i have the same problem and I have been update the pluging
 *  Plugin Support [dominikl65](https://wordpress.org/support/users/dominikl65/)
 * (@dominikl65)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17361888)
 * Hi [@josemgala](https://wordpress.org/support/users/josemgala/),
 * Please send the content of the error that appears.
 *  [josemgala](https://wordpress.org/support/users/josemgala/)
 * (@josemgala)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17361980)
 * I have solved it! thanks for the quick response!

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Fatal error: Uncaught Error: Cannot unset string offsets’ is closed to
new replies.

 * ![](https://ps.w.org/flexible-checkout-fields/assets/icon-256x256.gif?rev=2522628)
 * [Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager](https://wordpress.org/plugins/flexible-checkout-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flexible-checkout-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flexible-checkout-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/flexible-checkout-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flexible-checkout-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flexible-checkout-fields/reviews/)

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 14 replies
 * 8 participants
 * Last reply from: [josemgala](https://wordpress.org/support/users/josemgala/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-3/#post-17361980)
 * Status: resolved