WPML
Status
Resolved
Reported for
WPML Multilingual & Multicurrency for WooCommerce 5.3.6
Resolved in
WooCommerce Multilingual & Multicurrency 5.4.0
Related plugin/theme
WooCommerce Product Bundles
Topic tags
Compatibility, WCML

Overview of the issue

If you are using WooCommerce Product Bundles plugin, you will notice that a PHP notice occurs when a bundle product is added to the cart:

PHP Notice: Function product_type was called incorrectly. Product properties should not be accessed directly...

Workaround

Please, make sure of having a full site backup of your site before proceeding.


  • Open …/wp-content/woocommerce-multilingual/compatibility/WcProductBundles/class-wcml-product-bundles.php file

  • Look for line 796.

  • Replace:
    if ( isset( $cart_item['bundled_items'] ) && $cart_item['data']->product_type === 'bundle' ) {


  • With:
    if ( isset( $cart_item['bundled_items'] ) && $cart_item['data']->get_type() === 'bundle' ) {

All known issues →