WPML
Trạng thái
Đang mở
Được báo cáo cho
WPML Multilingual & Multicurrency for WooCommerce 5.2.0
Plugin/giao diện liên quan
WooCommerce Memberships
Thẻ chủ đề
Compatibility

Tổng quan về lỗi

Nếu bạn mua một sản phẩm bằng các ngôn ngữ phụ, bạn sẽ nhận thấy rằng tư cách thành viên không được gán. Bạn có thể thấy rõ điều này trên trang “Thank you” sau khi đặt hàng, nơi không có các chi tiết thành viên như mong đợi.

Giải pháp tạm thời

Vui lòng đảm bảo sao lưu toàn bộ trang web của bạn trước khi tiếp tục.


  • Mở tệp …/wp-content/plugins/woocommerce-memberships/src/class-wc-memberships-membership-plan.php.

  • Tìm dòng 218.

  • Thay thế:
    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;
    }


  • Bằng:
    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;
    }

Tất cả các lỗi đã ghi nhận →