- สถานะ
- เปิด
- รายงานสำหรับ
- 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; }