- Status
- Resolved
- Reported for
- WPML Multilingual & Multicurrency for WooCommerce 5.1.3
- Resolved in
- WCML 5.2.0
- Related plugin/theme
- Flatsome
- Topic tags
- Compatibility
Overview of the issue
When using Flatsome theme with WPML Multilingual & Multicurrency for WooCommerce, you may encounter a PHP error when you disable the Show home link in breadcrumb option (Appearance → Customize → WooCommerce → Product Catalog).
Trying to access array offset on value of type null in .../wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-strings.php on line 423
Workaround
Please, make sure of having a full backup of your site before proceeding.
- Open wp-content …/plugins/woocommerce-multilingual/inc/class-wcml-wc-strings.php file.
- Look for line 243.
- Replace:
if ( $breadcrumbs[1][1] != get_post_type_archive_link( 'product' ) ) { - With:
if ( isset($breadcrumbs[1][1]) && $breadcrumbs[1][1] != get_post_type_archive_link( 'product' ) ) {