WooCommerce Preis „ab“
-
Hallo,
ich bin gerade dabei, meinen Onlineshop aufzubauen. Da ich mehrere variable Produkte anbiete, habe ich per Code erreicht, das im Shop z.B. ab 20€ angezeigt wird, also nicht von-bis.
Mein Prolem ist nun, dass ganz unten im Shop (Archiv wie auch Einzelproduktansicht) folgender Code angezeigt wird.
add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 ); add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 ); function wc_wc20_variation_price_format( $price, $product ) { // Main Price $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) ); $price = $prices[0] !== $prices[1] ? sprintf( __( ' ab %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] ); // Sale Price $prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) ); sort( $prices ); $saleprice = $prices[0] !== $prices[1] ? sprintf( __( ' ab %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] ); if ( $price !== $saleprice ) { $price = '' . $saleprice . ' ' . $price . ''; } return $price; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 }
Hat jemand eine Idee, wie ich den aus dem Store löschen kann? Habe via Snippet auch die Änderung deaktiviert, aber leider steht der Code jetzt dauerhaft ganz unten.
Danke (=
- Das Thema „WooCommerce Preis „ab““ ist für neue Antworten geschlossen.