WPML

סקירת התקלה

בעת שימוש באפשרות ריבוי המטבעות של WPML Multilingual & Multicurrency for WooCommerce, ייתכן שתיתקל בבעיה הבאה:

אם האפשרות “הצג רק מוצרים עם מחירים מותאמים אישית במטבעות משניים” מופעלת, מוצרים משתנים אינם מציגים את בורר המטבעות, גם כאשר לכל הווריאציות מוגדרים מחירים מותאמים אישית במטבע המשני.

פתרון עוקף

אנא ודא שברשותך גיבוי מלא של האתר שלך לפני שתמשיך.

  • פתח את הקובץ …/wp-content/plugins/woocommerce-multilingual/inc/currencies/currency-switcher/class-wcml-currency-switcher.php.
  • חפש את שורה 353.
  • החלף את:
    if ( $product && $product->is_type( 'grouped' ) ) {
    	foreach ( $product->get_children() as $child_id ) {
    		if ( ! $hasOriginalCustomPrices( $child_id ) ) {
    			return false;
    		}
    	}
    } else {
    	if ( ! $hasOriginalCustomPrices( $currentProductId ) ) {
    		return false;
    	}
    }
  • ב:
    if ( $product && $product->is_type( 'grouped' ) || $product->is_type( 'variable' ) ) {
    	foreach ( $product->get_children() as $child_id ) {
    		if ( ! $hasOriginalCustomPrices( $child_id ) ) {
    			return false;
    		}
    	}
    } else {
    	if ( ! $hasOriginalCustomPrices( $currentProductId ) ) {
    		return false;
    	}
    }

כל התקלות הידועות