- 상태
- 미해결
- 보고된 제품
- WPML Multilingual & Multicurrency for WooCommerce 5.2.0
- 관련 플러그인/테마
- WooCommerce Memberships
- 주제 태그
- Compatibility
문제 개요
보조 언어로 제품을 구매하면 멤버십이 할당되지 않는 것을 알 수 있습니다. 특히 주문 후 이어지는 “Thank you” 페이지에서 이를 확인할 수 있으며, 해당 페이지에는 예상되는 멤버십 세부 정보가 없습니다.
임시 해결 방법
진행하기 전에 사이트 전체 백업을 완료했는지 확인하세요.
- …/wp-content/plugins/woocommerce-memberships/src/class-wc-memberships-membership-plan.php 파일을 여세요.
- 218번째 줄을 찾으세요.
- 다음 코드를:
public function get_product_ids() { if ( null === $this->product_ids ) { $this->product_ids = get_post_meta( $this->id, $this->product_ids_meta, true ); $this->product_ids = is_array( $this->product_ids ) ? array_unique( array_map( 'absint', $this->product_ids ) ) : []; } return $this->product_ids; } - 다음과 같이 교체하세요:
public function get_product_ids() { if ( null === $this->product_ids ) { $this->product_ids = get_post_meta( $this->id, $this->product_ids_meta, true ); $this->product_ids = apply_filters( 'wc_memberships_rule_object_ids', $this->product_ids ); $this->product_ids = is_array( $this->product_ids ) ? array_unique( array_map( 'absint', $this->product_ids ) ) : []; } return $this->product_ids; }