- Status
- Vom Autor gelöst
- Zugehöriges Plugin/Theme
- Germanized for WooCommerce
- Themen-Tags
- Compatibility, WCML
Übersicht über das Problem
Bei Setups mit Germanized for WooCommerce und WPML tritt ein Problem auf, bei dem Versandarten, die Bedingungen für Versandklassen verwenden, für übersetzte Produkte nicht verfügbar sind.
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-germanized/packages/woocommerce-germanized-shipments/src/ShippingMethod/ShippingMethod.php.
- Suchen Sie nach Zeile 957.
- Ersetzen Sie:
$classes = isset( $condition['classes'] ) && ! empty( $condition['classes'] ) ? array_map( 'absint', (array) $condition['classes'] ) : array();
- Durch:
$classes = isset( $condition['classes'] ) && ! empty( $condition['classes'] ) ? array_map( 'absint', (array) $condition['classes'] ) : array(); // compsupp-7583 workaround // Assuming $classes is an array of category IDs. $classes = array_map(function($class_id) { // Translate each ID using WPML return apply_filters('wpml_object_id', $class_id, 'category'); }, $classes);