ื“ืœื’ ืขืœ ื ื™ื•ื•ื˜

Open

Reported for: WooCommerce Multilingual & Multicurrency 5.2.0

Topic Tags: Compatibility

Overview of the issue

If you buy a product in second languages, you will notice that it is not assignment of a membership. You can observe this specifically in the "Thank you" page that follows the order, where the expected membership details are absent.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Open the …/wp-content/plugins/woocommerce-memberships/src/class-wc-memberships-membership-plan.php file.
  • Look for line 218.
  • Replace:
    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;
    }
    
  • With:
    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;
    }
    

ื”ืฉืืจ ืžืขื ื”

ืื ื ื”ื™ืฉืืจื• ื‘ื ื•ืฉื ื•ื”ื™ื• ืžื›ื‘ื“ื™ื ืœืื—ืจื™ื. ืื ืืชื” ืฆืจื™ืš ืขื–ืจื” ื‘ื‘ืขื™ื•ืช ืฉืื™ื ืŸ ืงืฉื•ืจื•ืช ืœืคื•ืกื˜ ื”ื–ื”, ื”ืฉืชืžืฉ ื‘ืคื•ืจื•ื ื”ืชืžื™ื›ื” ืฉืœื ื• ื›ื“ื™ ืœื”ืชื—ื™ืœ ืฆ'ืื˜ ืื• ืœืฉืœื•ื— ื›ืจื˜ื™ืก.

ืชื•ื›ืœ ืœื”ืฉืชืžืฉ ื‘ืชื’ื™ื ื”ื‘ืื™ื:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>