This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* WooCommerce - Produkt-Tabs deaktivieren | |
* https://wooexperte.de/snippet/woocommerce-produkt-tabs-reihenfolge-aendern/ | |
*/ | |
function woo_remove_product_tab($tabs) { | |
unset( $tabs['description'] ); // Entfernt Tab "Beschreibung" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WooCommerce - Produkt-Tabs umbenennen | |
* https://wooexperte.de/snippet/woocommerce-produkt-tabs-umbenennen/ | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
$tabs['description']['title'] = __( 'More Information' ); // Tab Beschreibung | |
$tabs['reviews']['title'] = __( 'Ratings' ); // Tab Bewertungen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Anzahl der verkauften Produkte in der WooCommerce Produktbeschreibung | |
* https://wooexperte.de/snippet/verkaufte-produkte-woocommerce-produktbeschreibung/ | |
*/ | |
add_action( 'woocommerce_single_product_summary', 'wc_product_sold_count', 11 ); // Zahl bestimmt die Position | |
function wc_product_sold_count() { | |
global $product; | |
$units_sold = get_post_meta( $product->id, 'total_sales', true ); | |
echo '<p>' . sprintf( __( 'Verkaufte Produkte: %s', 'woocommerce' ), $units_sold ) . '</p>'; // Text anpassen | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Überschrift Produktbeschreibung anpassen | |
* https://wooexperte.de/snippet/ueberschrift-produktbeschreibung-woocommerce-anpassen/ | |
*/ | |
add_filter( 'woocommerce_product_description_heading', 'wooexperte_product_description_heading' ); | |
function wooexperte_product_description_heading() { | |
return 'Eigene Überschrift'; // Hier die Überschrift anpassen! | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Für das Theme Storefront von WooCommerce Schlagwörter und Kategorie auf der Produktseite ausblenden | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* /** | |
* WooCommerce - Produkt-Tabs Reihenfolge ändern | |
* https://wooexperte.de/snippet/woocommerce-produkt-tabs-reihenfolge-aendern/ | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 ); | |
function woo_reorder_tabs( $tabs ) { | |
$tabs['reviews']['priority'] = 5; // Tab Zusätzliche Information - Erste Stelle | |
$tabs['description']['priority'] = 10; // Tab Beschreibung - Zweite Stelle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WooCommerce - Neues Produkt-Tab hinzufügen | |
* https://wooexperte.de/snippet/neues-produkt-tab-hinzufuegen/ | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); | |
function woo_new_product_tab( $tabs ) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WooCommerce - Shop Titel entfernen | |
* https://wooexperte.de/snippet/shop-titel-entfernen/ | |
*/ | |
add_filter( 'woocommerce_show_page_title', '__return_false' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WooCommerce - Text "Nicht vorrätig" anpassen | |
* https://wooexperte.de/snippet/woocommerce-aehnliche-produkte-ausblenden/ | |
*/ | |
add_filter('woocommerce_get_availability_text', function($text, $product) { | |
if (!$product->is_in_stock()) { | |
$text = ' auf Anfrage lieferbar'; // Text anpassen | |
} | |
return $text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WooCommerce - Mindestbestellwert | |
* https://wooexperte.de/snippet/woocommerce-mindestbestellwert/ | |
*/ | |
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' ); | |
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' ); | |
function wc_minimum_order_amount() { | |
$minimum = 100; // Hier bitte den Mindestbestellwert eingeben |
OlderNewer