- Status
- Offen
- Gemeldet für
- WPML Multilingual & Multicurrency for WooCommerce 5.2.0
- Zugehöriges Plugin/Theme
- WooCommerce Memberships
- Themen-Tags
- Compatibility
Übersicht über das Problem
Wenn Sie ein Produkt in Sekundärsprachen kaufen, werden Sie feststellen, dass keine Mitgliedschaft zugewiesen wird. Sie können dies insbesondere auf der „Vielen Dank“-Seite beobachten, die auf die Bestellung folgt und auf der die erwarteten Details zur Mitgliedschaft fehlen.
Problemumgehung
Bitte stellen Sie sicher, dass Sie über ein vollständiges Backup Ihrer Website verfügen, bevor Sie fortfahren.
- Öffnen Sie die Datei …/wp-content/plugins/woocommerce-memberships/src/class-wc-memberships-membership-plan.php.
- Suchen Sie nach Zeile 218.
- Ersetzen Sie:
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; } - Durch:
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; }