WPML
الحالة
محلول
النوع
خطأ برمجي
تم الإبلاغ عنه لـ
WPML Multilingual & Multicurrency for WooCommerce 5.3.6
تم الحل في
WooCommerce Multilingual & Multicurrency 5.4.0
الإضافة/القالب ذو الصلة
WooCommerce Product Bundles
وسوم الموضوع
Compatibility, WCML

نظرة عامة على المشكلة

إذا كنت تستخدم إضافة WooCommerce Product Bundles، فستلاحظ ظهور إشعار PHP عند إضافة منتج حزمة إلى سلة التسوق:

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

حل بديل مؤقت

يُرجى التأكد من أخذ نسخة احتياطية كاملة لموقعك قبل المتابعة.


  • افتح الملف …/wp-content/woocommerce-multilingual/compatibility/WcProductBundles/class-wcml-product-bundles.php

  • ابحث عن السطر 796.

  • استبدل:
    if ( isset( $cart_item['bundled_items'] ) && $cart_item['data']->product_type === 'bundle' ) {


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

جميع المشكلات المعروفة