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' ) {

모든 알려진 문제