Isi kandungan
If you’ve recently updated your WooCommerce plugin and attempted to import a layout, you might have encountered the following error:
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in wp-content/plugins/woocommerce/includes/admin/class-wc-admin-brands.php:659
This error stems from a bug in the newest version of WooCommerce, specifically when importing layouts that depend on WooCommerce features. The issue can disrupt workflows for users who rely on these layouts for their websites.
Temporary Workaround
While we wait for an official fix from the WooCommerce development team, we’ve put together a temporary solution to help you bypass this problem. You can resolve the issue by following these steps:
- Open the file located at
wp-content/plugins/woocommerce/includes/admin/class-wc-admin-brands.php
. - Locate the following line of code:
add_filter( 'pre_update_option_woocommerce_permalinks', array( $this, 'validate_product_base' ) );
- Comment out this line by adding
//
at the beginning, like so:// add_filter( 'pre_update_option_woocommerce_permalinks', array( $this, 'validate_product_base' ) );
- Save the file and test the layout import process again.
Staying Updated
We’re committed to keeping you informed about this issue. Be sure to check back on our blog or support forum for updates, as we’ll provide any new information as it becomes available.
Need Help?
Our support team is here to assist. If you’re having trouble implementing the temporary fix or have questions, please reach out to us via our support.
Thank you for your understanding and cooperation as we work to resolve this issue.